I am using GetSystemMetrics(SM_CXSIZEFRAME)
for the width of the border, it works with the basic design, but not with aero, how can I improve it, so it works with aero?
I am using GetSystemMetrics(SM_CYCAPTION)
for the height of the title bar but the value is too small for both, basic and aero design, what am I doing wrong here?
The title bar has a default height of 25 pixels, and can be set to any greater value up to 50 pixels.
The title bar font can be changed here: control panel > display settings. or: Windows settings > system > advanced display settings > change the size of text and other elements.
At the top of every window is the title bar, which displays the name of the application. It also has buttons that are clicked to minimize and restore the window and exit the application (see Win Minimize windows).
In unthemed Windows, GetSystemMetrics(SM_CYCAPTION)
is the height of the text in the title bar; you need to add in the size of the frame and border padding (GetSystemMetrics(SM_CYSIZEFRAME) + GetSystemMetrics(SM_CYEDGE) * 2
).
For themed Windows (which is the default these days), GetThemeSysSize
is most likely the function you're looking for; in particular, GetThemeSysSize(SM_CXBORDER)
for the border width, and GetThemeSysSize(SM_CYSIZE) + GetThemeSysSize(SM_CXPADDEDBORDER) * 2
for the title bar.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With