A | B | C |  D | E | F |  G | H | I |  J | K | L |  M | N | O |  P | Q | R |  S | T | U |  V | W | X |  Y | Z


The GetMenuItemRect function retrieves the bounding rectangle for the specified menu item.

Declare Function GetMenuItemRect Lib "user32" (ByVal hwnd As Long, ByVal hMenu As Long, ByVal uItem As Long, lprcItem As RECT) As Long

Operating Systems Supported
Requires Windows NT 4.0 or later; Requires Windows 95 or later


Parameter Information
- hWnd
[in] Handle to the window containing the menu.
Windows 98 and Windows 2000 or later: If this value is NULL and the hMenu parameter represents a popup menu, the function will find the menu window.

- hMenu
[in] Handle to a menu.

- uItem
[in] Zero-based position of the menu item.

- lprcItem
[out] Pointer to a RECT structure that receives the bounding rectangle of the specified menu item expressed in screen coordinates.

Return Values
If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Last update: 07 April 2006