The MenuItemFromPoint function determines which menu item, if any, is at the specified location.
UINT WINAPI MenuItemFromPoint(
HWND hWnd, |
|
HMENU hMenu, | |
POINT ptScreen | |
); |
Returns the zero-based position of the menu item at the specified location or -1 if no menu item is at the specified location.