# Re: The height of the menu bar and the title bar

Posted by ³Â¿³Ì on January 16, 1998 at 22:54:41:

In Reply to: The height of the menu bar and the title bar posted by Rice41 on January 16, 1998 at 07:18:06:

: I would like to know the exact 'height' for a menu bar and title bar to set the control within it. Thanks

You can use GetSystemMetrics to find them out.

Declare Function GetSystemMetrics Lib "user32" Alias (ByVal nIndex As Long) As Long

Public Const SM_CYCAPTION = 4
Public Const SM_CYMENU = 15

If you want to find the height of the window's caption, then use SM_CYCAPTION as nIndex when you call this function. If you want to know the height of the menubar, then use SM_CYMENU instead.

Follow Ups:

- a simpler way Ð¡Îâ 18:16:46 1/18/98 (0)