Version 1.21 beta
Copyright 2006 - 2009 PurpleSwift Software CC

www.purpleswift.com
Updated 4 August 2009



This version of CoolFrames is for Clarion 7, 6 and 5.5 only
 



Introduction

 

The visual impact is the first thing that your users will notice about your application.  You spend time and effort developing excellent software and now CoolFrames provides an elegant way to make your application look really slick.

 

CoolFrames provides custom graphics for your application window frame, caption and caption buttons. 

 

 

Features
  • 3 Graphic styles are provided.

  • Your own graphics can easily be added.

  • Takes less than 1 minute to add to your application.

  • All graphics can be linked into your application Ė single exe, no missing files.
     

Installing CoolFrames

Run the install program CoolFramesInstall.exe.

Notes

  1. When upgrading, simply install the new CoolFrames over the currently installed version.  It is not necessary to uninstall the previous version.

The install program does the following.

  1. Copies the CoolFrames files to your clarion directory as per table below.
  2. Adds a shortcut menu for CoolFrames.  Start | All Programs | Clarion 6 Accessories | CoolFrames
  3. Updates the global redirection file as per the table below.
  4. Registers the CoolFrames template.
s s s s
  Installed Files   s
 
Clarion 6    

 

 
  3rdParty      
    Bin C60CFMX.DLL  
      GDIPLUS.DLL  
    Docs CoolFrames CoolFrames.HTM
    Examples CoolFrames CoolFramesDemo.APP
    Lib C60CFMX.LIB  
      C60CFMXL.LIB  
    LibSrc CoolFrames.INC  
    Images CoolFrames Style images
    Template CoolFrames.TPL  
  s
      s

 

s s s s
  Redirection File   s
 

[Common]
*.DLL=C:\Clarion6\3rdParty\Bin
*.TP?=C:\Clarion6\3rdParty\Template
*.LIB=C:\Clarion6\3rdParty\Lib
*.JPG=C:\Clarion6\3rdParty\Images
*.GIF=C:\Clarion6\3rdParty\Images;D:\Clarion6\3rdParty\Images\CoolFrames
*.PNG=C:\Clarion6\3rdParty\Images\CoolFrames
*.INC=C:\Clarion6\3rdParty\Libsrc

  s
      s

 

Adding CoolFrames to your Application

 

Scenario 1 : Single exe

 

  1. Click the Global button and click the Extensions button on the Global Properties window.

  2. Click the Insert button and then select the EnableCoolFrames Extension.

  3. Click OK to close the global settings dialog.

 

Scenario 2 : Multi exe with data dll

For the data dll.

  1. Click the Global button and click the Extensions button on the Global Properties window.

  2. Click the Insert button and then select the EnableCoolFrames Extension.

  3. Click the Advanced tab

  4. Check the This is a multi DLL application

  5. Check the This is the data DLL

  6. Click OK to close the global settings dialog.

For the exe and other dllís.

  1. Click the Global button and click the Extensions button on the Global Properties window.

  2. Click the Insert button and then select the EnableCoolFrames Extension.

  3. Click the Advanced tab

  4. Check the This is a multi DLL application

  5. Click OK to close the global settings dialog.

 

The CoolFrames Templates

 

EnableCoolFrames Extension

 

 

Frame Style

This style will be used as the default style for all windows in your application.  Selecting one of the 3 standard styles results in the graphic images for that style being linked into your application.

 

Use the "Style Settings" button to change style specific settings.

 

Frame Transparency

0 is invisible and 255 is opaque (solid, no transparency).   This transparency factor is applied to the existing transparency in the graphics images.  What this means is that the transparent parts of the "Wire on Glass" images will remain transparent even with a transparency setting of 255.

Gray image saturation

This is used where "Grayed out" images are not provided.  If you only provide the normal window icon then this property is used to render a grayed out version of your icon.

Caption Text

You may customize your caption text font settings here.

 

CoolFrames Extension

 

 

Checking the "Disable CoolFrames in this procedure" will remove all CoolFrames template generated code from this procedure.  This can be used to exclude individual windows from getting a CoolFrames style.

 

The CoolFrames Class

 

The CoolFrames class has a lot of methods and properties.  The few that you might like to use are detailed below.  The class is prototyped in the include file Clarionxx\3rdParty\LibSrc\CoolFrames.inc where you can view the full listing.

 

s s s s
  Properties   s
 

Defaults.Disable

byte Set to TRUE to "remove" CoolFrames from your application at runtime.  Only affects windows that are not already open.
Opacity long The range of values is [2 to 254].  A value of 2 is completely transparent.  This "transparency" factor is applied to the frame images.  Any existing transparency in the images is added to.  This has the effect that transparent parts of your images always remain transparent.
Defaults.FrameStyle long This style will be used for all windows that do not have a the FrameStyle property set (0).  See FrameStyle property for details.
FrameStyle long This property is only used on opening a window.  It will not change windows that are already open.

The 3 standard styles expect the graphics images to be linked into your application.  If you would like the CoolFrames global template extension to link in all the images, not just the single style selected then check the "Include All Style Images in Project" option on the Advanced tab.  

cfSTYLE_VISTA equate(1)
cfSTYLE_WIREONGLASS equate(2)
cfSTYLE_METALLIC equate(3)
cfSTYLE_USEINI equate(4)
cfSTYLE_CUSTOM equate(5)

  s
      s

 

s s s s
  Methods   s
 

AdjustWidth

(long Width) Use in conjunction with {prop:width} or {prop:at,3}.  This is necessary because CoolFrames allows for variable frame thicknesses.

Example :
SaveWidth = window{prop:width}
....
window{prop:width} = ThisCoolFrames.AdjustWidth(SaveWidth)

AdjustHeight (long height) Use in conjunction with {prop:height} or {prop:at,4}.  This is necessary because CoolFrames allows for variable frame thicknesses.

Example :
SaveHeight = window{prop:height}
....
window{prop:height} = ThisCoolFrames.AdjustHeight(SaveHeight)

  s
      s

 

 

License and Copyright

 

This product is copyright © 2006 - 2009 by PurpleSwift Software CC.  Your application(s) do not require any licensing or royalties for including CoolFrames.

 

This product is provided as-is. Use it entirely at your own risk. Use of this product implies your acceptance of this, along with the recognition of copyright stated above. In no way will PurpleSwift Software CC, their employees or affiliates be liable in any way for any damages or business losses you may incur as a direct or indirect result of using this product.

 

 

Distribution

 

For standalone applications the CxxCFMX.DLL will need to be distributed with your application.  This DLL is not used in Local Mode compiled applications.

 

For running under Win98 and Win2K you will need the GDIPLUS.DLL.

 

If you have used your own graphics images then these will also be required unless they are linked into your application.

 

 

Compatibility

 

CoolFrames supports ABC, Legacy, DLL mode, Local mode and Multi-DLL applications.

 

CoolFrames has been tested under Win98, Win2K, WinNT and WinXP.

For running under Win98 and Win2K you will need the GDIPLUS.DLL.

 

CoolFrames is able to show the background images through the transparent portions of your window frames. The background is updated whenever the window gains focus.  This does not work properly with MDI child windows.  Background changes are not visible on MDI child windows.

 

 

Updates

 

Download the latest version of CoolFrames from www.purpleswift\tools\CoolFrames\CoolFramesInstall.exe

 

 

FAQ
  1. How do I change the frame style at runtime?

    To have the graphics images for the other styles available (compiled in) check the Include all style images in project option on the advanced tab.  Use the FrameStyle property to select the style at runtime.
     

  2. My app has many windows and I only want to add CoolFrames to a few windows.  Is there a better solution than going to each procedure and Disabling CoolFrames?

    Use the Set CoolFrames default setting to Disabled option on the Advanced tab of the CoolFrames Global extension.   You will then only need to Enable CoolFrames in the required procedures.
     

  3. Some of my procedures that use third-party templates do not have CoolFrames.  How can I add the CoolFrames extension to these procedures?

    Use the Add CoolFrames to all procedures except SOURCE option on the Advanced tab of the CoolFrames Global extension.  If you open the extension dialog on the offending procedure then the CoolFrames template will appear. 
     

  4. How do I create my own style?

    To create your own style you need to provide a set of graphics images that CoolFrames will use to render the various elements of the frame.   Although CoolFrames supports most graphics formats it is recommended that you use .PNG image files as this format supports transparency.

    For each image you may optionally provide a gray version of the image to be displayed when the window loses focus.   If not then CoolFrames will automatically generate a grayed version of each image at runtime.  The frame buttons (close etc) require an extra 2 images.   One for pressed and the other for selected (mouse over).

    Both the window frame and the menu frame require 4 images each as shown below:

     On the CoolFrames global template extension Settings tab select Custom as the Frame Style.  The image file names can now be captured on the various buttons provided.

    A good place to start is with the CoolFramesDemo app.   Select the Custom Frame Style, compile & run and the Frame will be re-styled.  Change the graphics piece at a time and see the effects.
     

  5. Setting my CoolFrames disable variable seems to have no affect.  Why?

    The disable variable is only read when the window is opened.   Setting the disable only affects windows that are subsequently opened.   All currently open windows are unchanged.

 

 

Version History

 

Version 1.21 beta (4 August 2009)

  1. Added support for right to left (RTL) windows layout. (Menu's not correct in CW7.0)

  2. Fixed bug where after ALT key use menu's become unresponsive.

  3. Fixed bug where MDI Child close / restore buttons not correctly redrawn.

  4. Fixed bug where in DLL mode ALT press resulted in GPF.

  5. Fixed bug where MDI Child background image is trashed on restore from maximized.

  6. Fixed bug where window with status bar changed size.

  7. Fixed GDI handle and memory leak.

Version 1.20 beta (23 April 2009)

  1. Reworked the window size calculations,  modified to work with ds_VisibleOnDesktop().

  2. Added support for MDI Child menu's and sizing buttons.

  3. Added support for modified menu items (user drawn menu items).

  4. Added a clarion 7 build 5349 version to the install file.

Version 1.19 beta (22 November 2008)

  1. Added FAQ 4.

  2. Fixed bugs where Custom Frame Style was selected.

  3. Added Titlebar height and frame width setting to Window Frame  button.

  4. Added Menu text font settings.  (Note only the root menu is affected)

  5. Fixed bugs where Banner was used.

  6. Added FAQ 5.

  7. Tweaked the initial window size calculation as some windows were shrinking a few pixels each time they were opened.

Version 1.18 beta (1 October 2008)

  1. Fixed bug changes to menu text was not shown.

Version 1.17 beta (12 August 2008)

  1. Fixed bug where procedure Char caused duplicate lable.

  2. Removed test images left in 1.16.  :-(

Version 1.16 beta (12 August 2008)

  1. Fixed bug where frameless windows (splash window) were given CoolFrames.

  2. Added clarion 6.2 build 9047 version to the install file.

  3. Fixed bug in template where importing procedures from a CoolFrames .APP created duplicate CoolFrames extensions which you could not delete.

  4. Added runtime object initialization check. 

  5. Added Set CoolFrames default setting to Disabled option.   See FAQ 2.

  6. Added Add CoolFrames to all procedures except SOURCE option.  See FAQ 3.

Version 1.15 beta (17 January 2008)

  1. Fixed bug where MDI child windows sometimes opened without any frame drawn.

  2. Fixed bug where MDI child windows sometimes opened behind calling window.

Version 1.14 beta (25 October 2007)

  1. Fixed bug where some non Frame windows did not re-draw client area after restore.

  2. Fixed bug where the frame caption text did not update on the desktop taskbar.

  3. Added support for re-colouring wallpaper image files. (Window & toolbar)

  4. Fixed bug where some windows open with corrupted border images.

  5. Fixed bug where toolbar wallpaper sometimes was applied to the window.

  6. Added support for textured frames.

  7. Added support for gradient frames.

  8. Reduced memory consumption by about 50%.   

  9. Added support for the clarion QBE.

  10. Modified the CoolFrames.disable using a Global variable to work in a multi DLL app.   Note : Global variable is now required to be declared as type BYTE.

  11. Added cf_TemplateDisabled equate for use with OMIT('*** CF Stuff ***',cf_TemplateDisabled)

Version 1.13 beta (8 May 2007)

  1. Fixed bug where windows without a system menu were given an icon and close button.

  2. Fixed bug where clarion buttons would appear over the CoolFrames buttons under Win2000.

 

Version 1.12 beta (24 April 2007)

  1. Fixed bug where restoring and MDI Frame from iconized left the client area unpainted.

  2. Fixed bug where MDI child windows sometimes opened with a little of the old titlebar showing below the CoolFrames titlebar.

Version 1.11 beta (17 April 2007)

  1. Fixed bug where CoolFrames broke text field mouse actions on MDI Child windows.

Version 1.10 beta (19 March 2007)

  1. Fixed bug where CoolFrames disabled non-menu hotkeys.

Version 1.09 beta (16 March 2007)

  1. Fixed bug in template, made disable variable optional.

  2. Fixed bug in Clarion 6 template, "Unknown variable %INIActive".

  3. Known issue.  WinXP buttons sometimes seen behind CoolFrames buttons.

Version 1.08 beta (15 March 2007)

  1. Fixed installer to actually install clarion 5.5 files.

  2. Fixed various bugs in clarion 5.5 template.

  3. Fixed bug where the returned caption text was sometimes corrupted.

  4. Fixed bug where the CoolFrames template extension was sometimes added to "source" procedures.

  5. Added template setting where a user variable may be used to disable CoolFrames at runtime.  Single EXE mode only.

  6. Fixed bug where menu hotkeys were case sensitive.

Version 1.07 beta (26 February 2007)

  1. Added clarion 5.5 build to the install file.

Version 1.06 beta (24 February 2007)

  1. Fixed regression in 1.05 where MDI Child window transparency broke.

  2. Known  issue.  MDI Child Maximize not supported.  (Buttons should merge into MDI Frame window)  This will be addressed in the next release of CoolFrames.

  3. Added "Centre Text" option to "Caption Text" button.

  4. Fixed bug where caption text colour was not set.

Version 1.05 beta (23 February 2007)

  1. Fixed bug where CoolFrames was not compatible with UltraTree.

  2. Added clarion 6.2 build 9048 version to the install file.

  3. Fixed bug where vista style border settings caused compile error.

  4. Fixed bug where window sizes would grow on each open / close.

  5. Fixed bug where the clarion frame would appear as the window was closing.

  6. Fixed bug where the clarion buttons would appear over the CoolFrames buttons under Win98

  7. Fixed template legacy support.

 

Version 1.04 beta (16 February 2007)

  1. Fixed bug where CoolFrames was not compatible with PowerToolbar.

  2. Added feature.  When a custom frame colour is selected then the buttons are re-coloured to match.

 

Version 1.03 beta (1 February 2007)

  1. Fixed bug where the caption text descending characters were clipped.

  2. Fixed bug where windows opened as maximized were still in restored state.

  3. Speeded up image colour setting code.

 

Version 1.02 beta (9 December 2006)

  1. Fixed bug where CoolFrames would sometimes GPF on startup in DLL mode compiles.

  2. Upgraded installer to SetupBuilder.

  3. Added option to disable wallpaper.

  4. Added option to disable toolbar wallpaper.

  5. Refixed bug where on some forms the CoolFrames graphics failed to display.

  6. Refined template to show modified content.

  7. Known issue, MDI Child window maximized frame sizing not ideal.

  8. Know issue, Sometimes toolbar wallpaper appears in random position on windows without any toolbars.

 

Version 1.01 beta (1 December 2006)

  1. Fixed bug where image file with explicit path would not load.

  2. Fixed bug where CoolFrames would GPF on closing window with EasyResizeAndSplit.

  3. Fixed bug in MDIChild window positioning and background image.

  4. Fixed bug where frame graphics around Min / Max buttons was distorted on maximize.

  5. Fixed bug where there was a gap right of the menu on maximize.

  6. Fixed bug where on some forms the CoolFrames graphics failed to display.

  7. Added missing image to example.

  8. Added support for Clarion Desktop (ini file).

  9. Know issue, Not 100% compatible with WinEvent - ds_VisibleOnDesktop.  On some windows the frame is incorrectly sized.

 

Version 1.00 beta (8 November 2006)

  1. Initial release