home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 September / Chip_2001-09_cd1.bin / zkuste / delphi / kolekce / d123456 / DFS.ZIP / GradForm.txt < prev    next >
Text File  |  2001-06-28  |  27KB  |  446 lines

  1. TdfsGradientForm v2.03
  2.  
  3. Description:
  4.   A form that paints it's caption bar in a gradient pattern, like the new
  5.   Microsoft Office applications.  It starts with black and moves gradually
  6.   to the system defined color.
  7.  
  8.  
  9. Contact Information:
  10.   The lateset version will always be available on the web at:
  11.     http://www.delphifreestuff.com
  12.   If you have any questions, comments or suggestions, please use the Delphi
  13.   Free Stuff Support Forum at:
  14.     http://www.delphifreestuff.com/discus/
  15.   If, for some reason, you can not use the web-based support forum, you can
  16.   email me at bstowers@delphifreestuff.com.  However, the support forum will
  17.   always take precedence over direct email since it provides a resource that
  18.   others can use when they have a problem.  Every message posted to the forum
  19.   is emailed directly to this account, so emailing me directly will not get
  20.   your message to me any faster.  It will only make the message less important
  21.   for me to respond to since only one person (you) is benefiting from it
  22.   instead of everyone interested.  Having said all that, please do email me
  23.   directly if it is regarding something that isn't really support related,
  24.   i.e. just to say thanks (as novel as that idea is).
  25.  
  26.  
  27. Installation:
  28.   Delphi 1:
  29.     * This class is not compatible with Delphi 1.
  30.  
  31.   Delphi 2, C++Builder 1:
  32.     * Simply place the files in the directory of your choosing.  There is no
  33.       component involved.
  34.  
  35.   Delphi 3, 4, 5, C++Builder 3 & 4:
  36.     * Do one of the following:
  37.       + Create a new package by selecting File | New and choosing Package from
  38.         the New tab in the dialog.
  39.       + Open an existing package file.  I suggest you do this if you already 
  40.         have a package that you like to use for small, third party components.
  41.         I specifically have a package named "3rdParty.dpk" that I use for 
  42.         small components that come from other people.  Or, if you are using
  43.         several of my components, you might create a "DFS.dpk" package and 
  44.         use it for all of my DFS components.
  45.     * In the resulting package window, click the Add button.
  46.     * In the Add dialog, on the Add Unit tab, enter the full path name of the 
  47.       component's registration unit (the unit that ends with 'Reg.pas', i.e. 
  48.       'BrowseDrReg.pas') and click OK.
  49.     * You may want to add the other source files (*.pas) to the package as
  50.       well in the same manner as you did the registration unit.  While this is
  51.       not required, not doing it will cause compiler warnings when the package
  52.       is compiled.  The component will function fine either way, but I 
  53.       personally find the warnings very irritating and am not happy until 
  54.       every compiler warning and hint is gone.
  55.     * If this package is new, or it has never been installed, click the 
  56.       Install button in the package window.  If this package is already 
  57.       installed in Delphi, click the Compile button.
  58.       Note that this will NOT add any items to your component palette.  
  59.       TdfsGradientForm is not a component, but a TForm descendant class.  So, 
  60.       instead of a component palette icon, you will instead have a new "DFS" 
  61.       tab added to the Object Repository (File | New).  If you prefer a tab
  62.       name other than "DFS", you can edit the sGradFormObjRepositoryPage and
  63.       sGradFormProjObjRepositoryPage constants in DSAMsgReg.pas and recompile
  64.       the package.  Note that you can use the name of an existing tab 
  65.       ("Forms" for example) to have the items added there.
  66.  
  67.   C++Builder 5 and up:
  68.     * Perform the "Delphi 3 and up, C++Builder 3 and up" steps above, except
  69.       for the last step (Compile or Install).
  70.     * Select the package the component has been added to, and choose 
  71.       Project | Edit Option Source to open the package options in the editor.
  72.     * In the entry for PFLAGS, add the "-LUvcl50" option.  For example:
  73.         <PFLAGS value="-$YD -$W -$O -v -JPHNE -M -LUvcl50"/>
  74.     * Perform the final step from above, Compile or Install.
  75.     * For Borland's official word on this situation, open the C++Builder help
  76.       file and search the index for "dsgnintf.dcu" and see the "Compiling
  77.       packages with DsgnIntf" section.
  78.  
  79.   Delphi 6 and up:
  80.     * Perform the "Delphi 3, 4, 5, C++Builder 3 & 4" steps above, except
  81.       for the last step (Compile or Install).
  82.     * Add the DesignIDE package to the Requires list of the package into which
  83.       the component is being installed.
  84.     * Perform the final step from above, Compile or Install.
  85.     * This is necessary because of changes to the design-time support units
  86.       introduced in Delphi 6.  For complete information, see the Del6New.hlp
  87.       file in your Delphi 6 Help directory.  In the index, search for
  88.       "upgrade issues" and in the resulting list of topics, select the
  89.       "DsgnIntf renamed and related changes" topic.
  90.  
  91.   Help File:
  92.     * Copy GradForm.Hlp to your Delphi\Help (or Builder\Help) directory.
  93.     * Edit the Delphi3.cnt (or Delphi4.cnt or bcb3.cnt) file and add the following
  94.       line to the Index section:
  95.         :Index TdfsGradientForm Reference=GradForm.hlp
  96.  
  97.  
  98. Design-Time Access to TdfsGradientForm Properties:
  99.   NOTE:  This information applies only to Delphi 3 and above, and C++Builder 3
  100.          and above.  Previous versions of Delphi and C++Builder do NOT support
  101.          design-time access of TForm descendants.  Sorry.  You can still use
  102.          this class with those prior versions, you just won't have access to
  103.          the new properties at design-time.
  104.   * Create a new application project.
  105.   * Select File | New and choose the "DFS" tab in the Object Repository window.
  106.   * Select the "Gradient Form" item and click the OK button.
  107.   * You should now have a new TdfsGradientForm type form added to the project, and
  108.     when you select it all new properties should be visible in the IDE.
  109.  
  110.  
  111. Adding Help to Delphi 2:
  112.   * Copy GradForm.Hlp and GradForm.Kwf to your Delphi\Help directory.
  113.   * Use the HelpInst tool included with Delphi to install the GradForm.Kwf
  114.     into Delphi.
  115.  
  116.  
  117. Delphi 2 and C++Builder 1 Notes:
  118.   * The best way to use this form is to add it to your Object Repository.
  119.     Simply open this unit in Delphi (or C++Builder 1, right click on the form
  120.     and select Add To Repository.  Then, when you want a TdfsGradientForm, you
  121.     just select it from the repository (File | New) and use the "Inherit"
  122.     option so you don't have to see all this code in your form.
  123.  
  124.     Delphi 2: If you have existing forms that you want converted to gradient
  125.     forms in Delphi, simply add "GradForm" to your "Uses" clause, and change
  126.     your form's ancestor to TdfsGradientForm.  An example:
  127.        Change:
  128.           TMyForm = class(TForm)
  129.        To:
  130.           TMyForm = class(TdfsGradientForm)
  131.  
  132.     C++Builder 1: To convert existing forms, add the GradForm.pas file to the
  133.       project (using Project Manager), then open the form's header file and add:
  134.  
  135.        #include "gradform.hpp"
  136.  
  137.     above the form class declaration.  Next, change the form's class declaraion:
  138.       Change:
  139.         class TForm1 : public TForm
  140.       To:
  141.         class TForm1 : public TdfsGradientForm
  142.  
  143.     And finally, change the form's constructor in the source (.cpp) file:
  144.       Change:
  145.         __fastcall TForm1::TForm1(TComponent* Owner)
  146.           : TForm(Owner)
  147.         {
  148.       To:
  149.         __fastcall TForm1::TForm1(TComponent* Owner)
  150.           : TdfsGradientForm(Owner)
  151.         {
  152.  
  153.  
  154. Developer's Notes:
  155.   * Special thanks go to Michiel Ouwehand of Epic MegaGames for the
  156.     clipping region tips (See the WMNCPaint method) and for pointing out
  157.     the DrawFrameControl API function (see the PaintCaptionButtons method).
  158.   * Be aware that this form has had some problems in MDI applications.  I
  159.     think I have worked them out, but I suggest you test everything very
  160.     thoroughly.  I used a small hack to do it (see GradClientWndProc).
  161.   * I've used strictly GDI calls for the painting in this component.  No
  162.     TCanvas, TBitmap, TBrush, etc.  This is because that although they are
  163.     extremely nice to use, they are not nearly as efficient.  That's not a
  164.     slam on them.  They have to be able to know how to do a lot of things,
  165.     and that requires overhead.  I have a very specific set of things to do
  166.     here, and I am *very* interested in getting it to do it as fast as
  167.     possible, so I'm willing to sacrifice the convenience of the classes
  168.     for the speed of the API.  One day I'll sit down and do a speed
  169.     comparison to see if I really gained that much this way.  If you don't
  170.     understand the GDI calls, leave them alone, or use them to experiment
  171.     with in learning how to use them.
  172.   * This form will only work in the 32-bit world.  I have used very few calls
  173.     that would prevent it from working on Delphi 1, so it will be fairly simple
  174.     to convert to Delphi 1, but there is a lot of stuff that would have to
  175.     be changed to make it look right.  For instance, I paint an icon in the
  176.     left corner for the system menu.  This is a Win95 style only.  Also, I
  177.     allow for BorderStyles like bsToolWindow that don't exist in Delphi 1.
  178.     Converting to Delphi 1 could be done, and shouldn't be all that
  179.     difficult since all the painting routines should work fine except for
  180.     the icon painting, and you don't need that for Win 3.1x anyway.
  181.     I just don't do any Delphi 1 development any more, so I leave it to one
  182.     of you to implement.  If you do, I would appreciate it if you could do
  183.     it using $IFDEF DFS_WIN32, and send me the changes so others can use it as
  184.     well.
  185.  
  186.  
  187. Known Issues:
  188.   * Help file has not been updated from the 1.56 version, so it does not include
  189.     the new stuff.  I'm switching help authoring tools and just don't have the
  190.     time at the moment to convert over the existing stuff into the new tool.
  191.     I will get it in a future version.
  192.  
  193.  
  194. Revision History:
  195.   2.03:  + Updated for Delphi 6 compatibility.  See updated install directions
  196.            above.
  197.   2.02:  + Updated for C++Builder 5 compatibility.
  198.   2.01:  + Setting the BorderStyle property to bsNone would cause division by
  199.            zero exceptions.  I'm not sure why you would do this since it results
  200.            in a form without a caption, but it's fixed anyway.
  201.   2.00:  + Mikl≤s Kovßcs was kind enough to fix the known issue of the help
  202.            button not wanting to stay depressed.
  203.          + Fixed problem of restore caption button only being pained on
  204.            minimized MDI child, not on any style child.
  205.          + Some people still got a range check in the FillRectGradient function.
  206.            Should definitely be fixed now.
  207.          + Added some new properties: Logo, InactiveLogo, LogoAlign, and
  208.            LogoLayered.  These are based on code provided by Joe White.  Many
  209.            thanks to him for sharing.  These related properties are for
  210.            displaying an image on the caption.  LogoLayered is probably the only
  211.            one that needs an explanation:  If true, the caption text is drawn
  212.            over the logo, if false it is moved over next to it.
  213.   1.95:  + It's *really* D5 compatible now.  Small change between the D5 eval 
  214.            version and the real, shipping D5 version broke it.
  215.   1.94:  + Classname changed.
  216.            D5 compatibility.
  217.   1.93:  + It was possible to get range check errors under D4 in the NC
  218.            painting (a very bad place for it to happen) because the underlying
  219.            HRGN type was changed in the RTL to an unsigned type and I wasn't
  220.            typecasting a WPARAM value.  Fixed.
  221.   1.92:  + Updated for C++Builder 4 compatibility.
  222.   1.91:  + Cleaned up most of the {$IFDEF DFS_CPPB} stuff to make the code
  223.            easier to read/maintain.  I always do the typecast now, which isn't
  224.            needed if compiling under Delphi, but won't hurt either (the cast
  225.            doesn't generate any extra compiled code).
  226.          + Fixed some problems in the banded gradient painting code that
  227.            effected only those of you writing descendant classes.  Many thanks
  228.            to Joe White for finding and fixing these.
  229.   1.90:  + Added UseDithering property.  If true, and in a high color mode,
  230.            a dithering mask will be used to draw the gradient.  This method
  231.            is better than the old because it doesn't have the "banding" effect.
  232.            The code this is based on was sent to me by Tamas Demjen, many thanks
  233.            to him.  If you want to read a good article discussing this, see his
  234.            web site.  The article is at
  235.            http://members.xoom.com/demjen/builder/gradient.html.
  236.   1.83:  + Using the OnCaptionPaint event caused the caption font handle to
  237.            be deleted, resulting in the system font getting used.  Thanks to
  238.            Joe White for finding and fixing this.
  239.          + Minimized MDI child forms had their restore caption button drawn as
  240.            minimize buttons.  Thanks to Huub Schaeks for finding and fixing
  241.            this.
  242.          + There was some annoying flicker on form creation when the form
  243.            inheritance was being used.  Thanks to Huub Schaeks again for finding
  244.            and fixing this one, too.
  245.   1.82:  + Stupid programmer (me) thought BorderWidth was in all versions of
  246.            Delphi & Builder.  It's not; it's D4 only.  v1.81 would only compile
  247.            under D4.  Fixed.
  248.   1.81:  + If BorderWidth had a value other than zero, you would get an
  249.            unpainted area around the form.
  250.   1.80:  + Added CaptionFont and UseSystemCaptionFont property.  If
  251.            UseSystemCaptionFont is true, CaptionFont is ignored.  Otherwise,
  252.            CaptionFont is used for the text in the caption bar.  The color of
  253.            the CaptionFont property is ignored, and the CaptionTextColor and
  254.            InactiveCaptionTextColor properties are still used for this as always.
  255.            Also, the Size property of CaptionFont has no effect, either.  This
  256.            is because you really wouldn't want to try to account for how big the
  257.            user's caption bar is and adjust your font size for that in code.
  258.            Instead, I just built it into the class. Of course, if you pick a
  259.            font that doesn't support a lot of sizes (i.e. non-TTF), you could
  260.            still end up with a font that doesn't fit well.
  261.          + Gradient looked bad on 16-color systems.  There's no really good way
  262.            of doing a gradient with the basic 16-colors available on these
  263.            systems, so by default the gradient won't be painted now on these
  264.            systems.  If you find some reason to go ahead and do it, you can
  265.            override this behavior by using the new public property Paint16Color.
  266.          + OnCreate event was being called twice (once before constructor, once
  267.            after) in C++Builder apps.  Fixed so that it now behaves the same
  268.            as a regular TForm (i.e. OnCreate called after constructor).
  269.          + UseWin98Gradient property has been extended to also mean "use NT 5
  270.            gradient".  I should probably rename it, but that would break
  271.            existing DFM files, and the name would probably be really silly, too.
  272.            Maybe I'll rename it to "UseSystemGradient" in the next major version.
  273.   1.72:  + If the system menu Close item was disabled (via CS_NOCLOSE class
  274.            window style, for example) the close caption button was not drawn
  275.            in the disabled state.
  276.   1.71:  + Fixed bug that would cause OnCreate to be called twice in Delphi 4
  277.            if the OldCreateOrder property were set to FALSE.  Thanks to Pepe
  278.            Lazo <info@servosis.com> for finding and fixing this.
  279.   1.70:  + Fixed "unresolved external" linker errors in C++Builder.  If you are
  280.            interested in the details, search for "DFS_HDC" in the source.
  281.          + Added real IDE experts (see GradFormReg.pas) for proper design-time
  282.            support of the new properties.  This removes all the old fooling
  283.            around with the object repository you had to do to install this thing
  284.            in previous versions.  If you have installed a previous version of
  285.            this, you can, and should, now delete that old entry from the object
  286.            repository.  You now use the items on the DFS tab of the object
  287.            repository to create new TdfsGradientForms.  Please read the
  288.            installation section above for complete details of what old files
  289.            should be removed/deleted.
  290.          + Delphi 4 compatibility.
  291.   1.62:  + Cut and paste error in the SetGradientInactiveStopColor method.  Did
  292.            not properly track whether the system default inactive color was
  293.            being used or not.  Thanks to Pepe Lazo for pointing the erroneous
  294.            code out to me and providing a fix.
  295.          + System icon now always paints in design-time.  Thanks again to Pepe
  296.            Lazo for catching and fixing.
  297.          + Caption font was created too soon and in the wrong place.
  298.            BorderStyle values of bsToolWindow and bsSizeToolWin would use the
  299.            big (normal) font.  Thanks yet again to Pepe Lazo for catching this.
  300.          + Moved the following methods from private to protected visibility and
  301.            made them virtual:  DrawCaption, GetCaptionRect DrawCaption,
  302.            PaintMenuIcon, FillRectSolid, FillRectGradient, PaintCaptionText,
  303.            PaintCaptionButtons.  More friendly to those who want to descend from
  304.            the class.
  305.   1.61:  + Fixed problem with changing a form's Caption property in the
  306.            OnShow, OnActivate and/or OnDeactivate events.  Caused some nasty
  307.            screen painting problems.
  308.   1.60:  + Known issues section updated, don't forget to check it.
  309.          + Added Version property.
  310.          + Added UseWin98Gradient property.  Setting to TRUE will effectively
  311.            disable all TdfsGradientForm code if the app is being run on a Windows
  312.            98 system.  This is to let Win98 provide the gradient while still
  313.            allowing your app to do the gradient on Win95/NT systems.  It
  314.            *should* catch NT 5.0 systems as well, but I've not tested that so
  315.            I can't swear to it.
  316.            NOTE:  Because I have to recreate the window handle when you change
  317.            the value of this property, the form is going to disappear from the
  318.            IDE.  I can't find a way to force the IDE to redisplay the form, so
  319.            you will have to manually press F12 to redisplay it after changing
  320.            the property value.  However, this does not happen at run-time so you
  321.            don't need to do anything special in code.
  322.          + Changing the system caption color would only cause non-MDI child
  323.            forms to updated their colors.  Fixed.
  324.          + Changing the caption of an MDI child TdfsGradientForm in its OnActivate
  325.            and/or OnDeactivate method would cause very nasty painting problems
  326.            when it overlapped other MDI children.  Fixed.
  327.          + Added three new related properties: GradientInactiveStartColor,
  328.            GradientInactiveStopColor, and InactiveCaptionTextColor.  As you
  329.            might guess (unless you've been bashing your head between two bricks
  330.            for more than an hour a day), they work exactly the same as
  331.            GradientStartColor, GradientStopColor and CaptionTextColor except
  332.            they apply when the window is inactive (not focused).
  333.   1.56:  + The gradient could become somewhat distorted if in high color mode
  334.            and the caption was wider (in pixels) than the GradientColors value.
  335.            It now uses the low color painting method in this case which is
  336.            slower, but does not have the distortion.  Thanks to Jim Burns
  337.            (jimburns@technologydynamics.com) for catching this.
  338.          + C++Builder 3.0 compatible.
  339.   1.55:  + I goofed on when the GradientStopColor was stored.  It ended up such
  340.            that you could not change the GradientStopColor at design time.
  341.          + Fixed problem that would cause the text that showed up in the task
  342.            switch window (Alt-Tab) to be incorrect if you changed the Caption
  343.            property from its design-time value.  An unexpected bonus from this
  344.            fix was that it cleared up the maximized MDI child flickering problem
  345.            as well.  :)
  346.          + Compatible with C++Builder 1.0.
  347.   1.54:  + Caption buttons had a few problems.  Min/max buttons weren't being
  348.            drawn disabled when they should, and help button didn't always show
  349.            up when it should.
  350.   1.53:  + Drawing minimize/maximize caption buttons when I shouldn't have been.
  351.          + Design-time drawing bug fixed.
  352.   1.52:  + Fix for WM_SYSCOLORCHANGE in last version wasn't exactly right.
  353.          + Now includes a help file!
  354.   1.51:  + Wasn't properly responding to WM_SYSCOLORCHANGE message anymore.
  355.          + Updated for new DFS.INC file, component tab name, history/comments
  356.            file.
  357.   1.50:  + Added Register procedure so you can get at the published stuff and
  358.            see it in action at design-time under Delphi 3!  Sorry, previous
  359.            versions of Delphi and C++Builder do not support this.
  360.   1.16:  + Problem with MDI children that were maximized when they did not
  361.            take up entire client area.
  362.   1.15:  + Nasty little bug in MDI apps with child controls.
  363.          + Got the system menu problem fixed so that the paint problem isn't
  364.            visible the entire time the menu is up.  Now it just flashes.  :(
  365.          + WindowMenu items were not properly displaying MDI child captions.
  366.            To fix this, I had to re-introduce a flash in the caption every
  367.            time the Caption property is changed in an MDI child at run-time.
  368.   1.14:  + Made CalculateColors a virtual protected method.
  369.          + Three new properties:
  370.            GradientStartColor and GradientStopColor to use other than the
  371.               default gradient colors.  These were added by William O'Connell
  372.               <woc@A.crl.com>, many thanks to him.
  373.            CaptionTextColor to change the color of the caption text.
  374.          + There's some sort of bug in the Windows non-client paint stuff
  375.            that is causing the non-client area to be painted when the left
  376.            mouse button is clicked in it.  That's not so bad, except that it
  377.            paints under the caption buttons in the default system color.
  378.            I've added a handler for this and WM_SYSCOMMAND (don't ask) and
  379.            repaint it as soon as I can, but you still see a flash when you
  380.            click on the border, and you see it the whole time that the system
  381.            menu is displayed. Please email me if you have any ideas on this.
  382.   1.13:  + Fixed an off-by-one error in caption button painting. Thanks to
  383.            Robert Galle for this one.
  384.   1.12:  + Another MDI bug.  If the MDI child form is not a TdfsGradientForm
  385.            descendant, the caption text will not update if the child is
  386.            maximized and the child's caption text is changed.  There is a
  387.            work-around for this, but it causes an annoying flicker which I
  388.            can not stand.  If you can stand it, look at the GradClientWndProc
  389.            method and uncomment the code there.  The better solution, I
  390.            think, is to make your MDI child form's a descendant of
  391.            TdfsGradientForm.  For those of you who want your app to be "just
  392.            like Word", you can use the new FPaintGradient property (below)
  393.            so that the child windows are never painted with a gradient. This
  394.            solution doesn't suffer from the flicker problem.
  395.          + Changed FGradientOnInactive boolean property to FPaintGradient set
  396.            property.  Three possible values: gfpAlways, gfpActive and
  397.            gfpNever.
  398.          + Cleaned up some code that was now longer necessary.  May have sped
  399.            up the paint time by a nanosecond or two.  :)
  400.   1.11:  + Fixed problem for people who want gradient MDI child windows.
  401.          + MDI child caption text changing at runtime when child window was
  402.            maximized would not update caption text.  Fixed.
  403.          + Got rid of some of the old painting code that wasn't used, as it
  404.            didn't work very well anyway.  There are now two painting routines
  405.            (FillRectGradientHigh, FillRectGradientLow) for high color mode
  406.            and 256 or less color mode.  The former is faster, but doesn't
  407.            work on less than high color mode (16-bit depth) because it is
  408.            "palette stupid".
  409.   1.10:  + Fixed problem that could cause the caption to be painted all black
  410.            when first created.
  411.          + Added OnPaintCaption property.  Makes event available to paint on
  412.            the caption after the gradient, icon, and buttons have been drawn,
  413.            but before the text is.  See demo program for example of use.
  414.   1.04:  + Found a way to get a nice 16x16 version of the icon.  Icon is now
  415.            drawn much better than before.
  416.   1.03:  + Fixed problem with redrawing inactive window when
  417.            GradientOnInactive set to FALSE.
  418.          + Fixed problem of gradient disappearing if Caption set at run-time.
  419.          + Fixed all the MDI bugs that I know about.
  420.          + Gradient would goof up in some cases where window was sized very
  421.            small horizontally.  Fixed.
  422.          + Fiddled with the button drawing some more and I think the sizes
  423.            are finally right under all circumstances.
  424.          + Didn't recreate the caption font if the user changed it.
  425.            (WM_SETTINGCHANGE)  I knew about this one for a while, just kept
  426.            fogetting to fix it...
  427.          + Resizing window so that it was too small for the caption text to
  428.            fit in the available space caused it to write under the buttons.
  429.            It now properly substitutes ellipsis ("...") if the string won't
  430.            fit.  I was dreading this one until I found that the Delphi Win32
  431.            docs don't document a DrawText flag (DT_END_ELLIPSIS) that will
  432.            do this for you automagically.  Happy day. :)
  433.   1.02:  + Added some new painting routines.  They are controlled below with
  434.            the conditional defines PAINT-OLD-WAY, STRETCH-WITH-BRUSH and
  435.            STRETCH-WITH-PEN. Please experiment with them and tell me which
  436.            you find to be the fastest.
  437.   1.01:  + Fixed the inactive flashing when GradientOnBackground is set.  It
  438.            helps if you read the docs instead of assuming you know what it
  439.            says.... grr....
  440.          + Fixed problem with incorrect button drawn on maximized windows.
  441.            Now correctly draws restore button if window is maximized.
  442.          + Redid button size code.  Should be right now, but still not 100%
  443.            sure.  The GetSystemMetrics return values don't seem to be correct.
  444.   1.00:  + Initial release
  445.  
  446.