Link to home
Start Free TrialLog in
Avatar of cubic77
cubic77Flag for Finland

asked on

How do I get the size of the window elements?

How do I get the size of the window border (left/right/bottom)?
How do I get the height of application's main menu?

(Delphi 7, Win XP, Win 7)
Avatar of pasolo
pasolo


Height, in pixels, of a single-line menu bar:
GetSystemMetrics(SM_CYMENU)

Same function with
SM_CXBORDER, SM_CYBORDER
Width and height, in pixels, of a window border
For windows with 3D look use:
SM_CXEDGE, SM_CYEDGE
Avatar of cubic77

ASKER

> For windows with 3D look use:

So normal windows in Win 7 have 3D look?
What about Win XP?
Or normal/3D look is dictated by the themes (enabled/disable)?
Avatar of cubic77

ASKER

Nope.
The SM_CYEDGE and SM_CYBORDER is not working.
They return 1 and 2 pixels while the border/frame around my windows (standard Win 7 with Aero interface) is 7.
Avatar of cubic77

ASKER

I think what I needed was SM_CYSIZEFRAME.
ASKER CERTIFIED SOLUTION
Avatar of pasolo
pasolo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial