Scalabium Software

 

SMExport advertising

Knowledge for your independence.
 

 
Home Delphi and C++Builder tips


#52:How can I get the sizes of some system controls?

Sometimes in run-time you must detect the sizes of some system controls. For example, width of scrollbar or height of form caption etc.

If you want to get this system value, you must call the Windows API's function GetSystemMetrics with different parameter. In result you'll get the wished. For example,

intFormCaptionHeight := GetSystemMetrics(SM_CYCAPTION)

As result, you in intFormCaptionHeight you have a height of normal caption area in pixels.

The full list of wished system metrics you can view in Windows API's help by GetSystemMetrics topic.

The some useful metrics:
SM_CMOUSEBUTTONS - number of buttons on mouse
SM_CXFULLSCREEN, SM_CYFULLSCREEN - width/height of the client area for full-screen window
SM_CXHSCROLL, SM_CYHSCROLL - width/height of the arrow bitmap on horizontal scrollbar
SM_CXSCREEN, SM_CYSCREEN - width/height of the screen
SM_CXSIZE, SM_CYSIZE - width/height of a button in window caption

See also
 
Paradox to MS Access converter
Database Information Manager
SMImport suite
SMMsg suite
DBExport tools
Clarion to Text converter
ABA Picture Convert
Clarion Viewer
ABA Document Convert
ABA Database Convert
 
 
Contact to webmaster

 

Borland Software CodeGear Embarcadero Technologies Scalabium Delphi tips

Copyrightc 1998-2012, Scalabium Software. All rights reserved.
webmaster@scalabium.com

December 9, 1999

SMExport advertising