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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top