window border width and height in Win32 - how do I get it?

前端 未结 6 921
慢半拍i
慢半拍i 2020-12-08 10:10
      ::GetSystemMetrics (SM_CYBORDER)

...comes back with 1 and I know the title bar is taller than ONE pixel :/

I also tried:

     RECT r;
         


        
6条回答
  •  遥遥无期
    2020-12-08 10:32

    Head Geek gives the detailed answer: use GetSystemMetrics to add up the caption and border bits. You can also do a difference on width/height between the GetWindowRect and GetClientRect. This will give you the total of all captions/borders/etc.

提交回复
热议问题