www.icetips.com  Icetips Utilities Documentation 5/9/2015    

Windows Class: SetToolboxCaption

Previous  Top  Next  


Prototype: (Long pHwnd, Byte pSetOn=True)

 

pHwndHandle of a window to set toolbox caption on.

 

pSetOnIndicates if the effect is to be turned on or off.  True turns it on, False turns it off.

 

This method sets a toolbox caption for the window.  A toolbox caption has a smaller caption bar but also can only have the close button and nothing else,  i.e. no minimize, maximize buttons or system menu are visible.  This works well for toolbox windows.  This method resizes the window to match the correctly small and large caption bars as reported by GetSysMetrics with the SM_CYCAPTION and SM_CYSMCAPTION parameters. 

 

Note:

Even though this method takes the handle of the window as a parameter, it presumes that the window is also the current target, i.e. it uses 0 as window reference to get and set the size of the window.  If you are using this in a situation where the window is not the current target, please keep this in mind and use SetTarget before and after calling this method.

 

Example:

 

ITW  ITWindowsClass

Code

ITW.SetToolboxCaption(0{Prop:Handle} , Choose(Loc:IsToolbox=True, False, True))

Loc:IsToolbox = Choose(Loc:IsToolbox=True, False, True)

 

This will toggle the window between being a toolbox window and being a normal window.  All styles of the window are preserved so that when the toolbox is turned off, all properties of the window as it was originally are restored.

 

Normal window:

 

SetToolboxCaptionNormal

 

Same window with SetToolboxCaption turned on:

 

SetToolboxCaptionSmall

 

See also:

GetSysMetrics

 

 

 



Direct link to this page: http://www.icetips.com/manuals/utilities/settoolboxcaption_window.htm