How to get standard windows's title and menu 's height?

  • Thread starter Thread starter Ekey
  • Start date Start date
E

Ekey

Hi:
i try to use GetWindowRect and GetClientRect API,but i think it wrong.
Following as:

GetWindowRect((int)hwnd,ref windowRect);
GetClientRect(hwnd,ref clientRect);
int winHeight = (windowRect.bottom - windowRect.top) -
(clientRect.bottom - clientRect.top);

Is winHeight title and menu's height?
there are have other methods?

THS
Ekey
 
Hi Ekey,

How about:
SystemInformation.CaptionHeight (from MSDN "Use CaptionHeight to determine
the size of the standard window caption.")

and:
SystemInformation.MenuHeight

Both are in the System.Diagnostics namespace.

Cheers,
Allan.
 
Make that, the System.Windows.Forms namespace.

Allan Taunt said:
Hi Ekey,

How about:
SystemInformation.CaptionHeight (from MSDN "Use CaptionHeight to determine
the size of the standard window caption.")

and:
SystemInformation.MenuHeight

Both are in the System.Diagnostics namespace.

Cheers,
Allan.
 
Back
Top