Help Center

GetItemFromPointfunction

Determines which menu item, if any, is at the specified location.

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 GetItemFromPoint (BYVAL hWin AS HWND, BYVAL hmenu AS HMENU, BYVAL ptScreen AS POINT) AS LONG
FUNCTION GetItemFromPoint (BYVAL hwnd AS HWND, BYVAL hmenu AS HMENU, BYVAL x AS LONG, BYVAL y AS LONG) AS LONG

Parameters

NameDescription
hWinA handle to the window containing the menu. If this value is NULL and the hMenu parameter represents a popup menu, the function will find the menu window.
hMenuA handle to the menu containing the menu items to hit test.
ptScreenA structure that specifies the location to test. If hMenu specifies a menu bar, this parameter is in window coordinates. Otherwise, it is in client coordinates.

Return value

Returns the zero-based position of the menu item at the specified location or -1 if no menu item is at the specified location.

Description

Determines which menu item, if any, is at the specified location.

Reference

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