指定のメニューの矩形のサイズ取得
Declare Function GetMenuItemRect Lib "user32.dll" _
(ByVal hWnd As Long, ByVal hMenu As Long, _
ByVal uItem As Long, lprcItem As RECT) As Long
Declare Function GetMenuItemRect Lib "user32.dll" _
(ByVal hWnd As Integer, ByVal hMenu As Integer, _
ByVal uItem As Integer, lprcItem As RECT) As Integer
BOOL GetMenuItemRect(
HWND hWnd,
HMENU hMenu,
UINT uItem,
LPRECT lprcItem
);
引数
hWnd
メニューを持つウィンドウのハンドルhMenu
メニューのハンドルnPosition
メニュー項目のインデックス or IDuItem
メニュー項目のインデックス(最初は0)lprcItem
(戻り値)矩形サイズを取得するRECT構造体戻り値
正常終了のとき 0以外備考
エラーのとき 0
データはスクリーン座標で戻るので注意!