Help Center

GetRectfunction

Calculates the size of a menu bar or a drop-down menu.

Windowsfunctiondoc-orphan
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.

Syntax

FUNCTION GetRect (BYVAL hWin AS HWND, BYVAL hmenu AS HMENU, BYVAL prcmenu AS RECT PTR) AS LONG
FUNCTION GetRect (BYVAL hwnd AS HWND, BYVAL hmenu AS HMENU, BYREF rcmenu AS RECT) AS LONG
FUNCTION GetRect (BYVAL hWin AS HWND, BYVAL hmenu AS HMENU) AS RECT

Parameters

NameDescription
hWinHandle of the windowor dialog that owns the menu. If this value is NULL and the hMenu parameter represents a popup menu, the function will find the menu window.
hmenuThe handle of the menu.
prcmenuA pointer to a RECT structure that receives the bounding rectangle of the specified menu expressed in screen coordinates.
rcmenuA RECT structure that receives the bounding rectangle of the specified menu expressed in screen coordinates.

Return value

If the function succeeds, the return value is 0. If the function fails, the return value is a system error code.

The third overloaded method returns a RECT structure directly.

Description

Calculates the size of a menu bar or a drop-down menu.

Reference

  • Documented in Windows/WIndows Controls/CMenu Class.md
  • Topic: About Menus