指定の位置のメニュー項目を特定
Declare Function MenuItemFromPoint Lib "user32.dll" _
(ByVal hWnd As Long, ByVal hMenu As Long, _
ptScreen As POINTAPI) As Long
Declare Function MenuItemFromPoint Lib "user32.dll" _
(ByVal hWnd As Integer, ByVal hMenu As Integer, _
ptScreen As POINTAPI) As Integer
int MenuItemFromPoint(
HWND hWnd,
HMENU hMenu,
POINT ptScreen
);
引数
hWnd
ウィンドウのハンドルhMenu
メニューのハンドルptScreen
座標を指定するPOINTAPI構造体戻り値
指定の位置にメニューが存在するとき メニューの項目番号
メニューが存在しないとき -1