开发者

Get system menu width in pixels using winapi

开发者 https://www.devze.com 2023-04-05 17:36 出处:网络
I need to obtain the total width in pixels of the window/system menu (minimize, maximize and close) in C using basic WINAPI. I came across the WM_GETTITLEBARINFOEX message which is good for me, but un

I need to obtain the total width in pixels of the window/system menu (minimize, maximize and close) in C using basic WINAPI. I came across the WM_GETTITLEBARINFOEX message which is good for me, but unfortu开发者_JAVA百科nately it is supported starting with Vista and my application has to support also XP and 2003. Can anyone tell me how I can make this work? Any suggestions are welcome.

Thanks in advance!


You say system menu, but as Adrian mentioned, WM_GETTITLEBARINFOEX retrieves information about the title bar buttons. If that's what you actually want, you can probably use GetSystemMetrics(SM_CXSIZE) on anything < Vista.

SM_CXSIZE = The width of a button in a window caption or title bar, in pixels.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号