Reputation: 63
How to get the (text size or height) of the titlebar.
I tried to use GetSystemMetrics(SM_CYCAPTION)
but it returns the height of the titlebar not the text size.
Any suggestions?
Upvotes: 0
Views: 495
Reputation: 612794
Call SystemParametersInfo
passing SPI_GETNONCLIENTMETRICS
. This will populate a NONCLIENTMETRICS
structure. Within that structure is lfCaptionFont
which contains the information you desire.
Upvotes: 3