网站首页  词典首页

请输入您要查询的函数:

 

术语 getmenuitemrect
释义 GetMenuItemRect
语法:
BOOL GetMenuItemRect( HWND hWnd,
HMENU hMenu,
UINT uItem,
LPRECT lprcItem
);
GetMenuItemRect功能
该GetMenuItemRect函数检索指定的菜单项的边界矩形。
参数
hWnd
[in]的窗口句柄包含菜单。
Windows 98/Me和Windows 2000/XP的:如果该值为NULL和hMenu参数是一个弹出菜单,函数会发现菜单窗口。
hMenu
[in]一个菜单句柄。
uItem
[in]零基础的菜单项的位置。
lprcItem
[out]指向一个RECT结构,接收指定菜单在屏幕上对项目的边界矩形坐标。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,使用GetLastError函数。
备注
在返回的矩形为了有意义,必须在菜单弹出,如果一个弹出式菜单或附加到一个窗口,如果一个菜单栏。菜单项立场没有确定,直到菜单。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 4.0
参见
菜单
==英文原文==GetMenuItemRect Function
The GetMenuItemRect function retrieves the bounding rectangle for the specified menu item.
Syntax
BOOL GetMenuItemRect( HWND hWnd,
HMENU hMenu,
UINT uItem,
LPRECT lprcItem
);
Parameters
hWnd
[in] Handle to the window containing the menu.
Windows 98/Me and Windows 2000/XP: If this value is NULL and the hMenu parameter represents a popup menu, the function will find the menu window.
hMenu
[in] Handle to a menu.
uItem
[in] Zero-based position of the menu item.
lprcItem
[out] Pointer to a RECT structure that receives the bounding rectangle of the specified menu item expressed in screen coordinates.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, use the GetLastError function.
Remarks
In order for the returned rectangle to be meaningful, the menu must be popped up if a popup menu or attached to a window if a menu bar. Menu item positions are not determined until the menu is displayed.
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 4.0
See Also
Menus
==原始网址==http://msdn.microsoft.com/en-us/library/ms647981(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:23:50