menu API
来源:互联网 发布:查看windows系统版本 编辑:程序博客网 时间:2024/06/07 01:08
获得指定菜单的flag,如果这个菜单打开了子菜单,这个函数也将返回子菜单的数量。
UINT WINAPI GetMenuState( _In_ HMENU hMenu, //将打开的菜单句柄 _In_ UINT uId, //菜单号 _In_ UINT uFlags //参数的理解方式);
uflags:Indicates how the uId parameter is interpreted. This parameter can be one of the following values.
- MF_BYCOMMAND
- 0x00000000L
Indicates that the uId parameter gives the identifier of the menu item. TheMF_BYCOMMAND flag is the default if neither the MF_BYCOMMAND norMF_BYPOSITION flag is specified.
- MF_BYPOSITION
- 0x00000400L
Indicates that the uId parameter gives the zero-based relative position of the menu item.
返回值:若specified item不存在,返回-1
存在的话,返回mask值,
Return code/value
- MF_CHECKED
- 0x00000008L
A check mark is placed next to the item (for drop-down menus, submenus, and shortcut menus only).
- MF_DISABLED
- 0x00000002L
The item is disabled.
- MF_GRAYED
- 0x00000001L
The item is disabled and grayed.
- MF_HILITE
- 0x00000080L
The item is highlighted.
- MF_MENUBARBREAK
- 0x00000020L
This is the same as the MF_MENUBREAK flag, except for drop-down menus, submenus, and shortcut menus, where the new column is separated from the old column by a vertical line.
- MF_MENUBREAK
- 0x00000040L
The item is placed on a new line (for menu bars) or in a new column (for drop-down menus, submenus, and shortcut menus) without separating columns.
- MF_OWNERDRAW
- 0x00000100L
The item is owner-drawn.
- MF_POPUP
- 0x00000010L
Menu item is a submenu.
- MF_SEPARATOR
- 0x00000800L
There is a horizontal dividing line (for drop-down menus, submenus, and shortcut menus only).
CheckMenuItem是一个API函数,功能是复选或撤消复选指定的菜单条目。
DWORD WINAPI CheckMenuItem( _In_ HMENU hmenu, //含有其菜单项的标志将被提取得的菜单的句柄。 _In_ UINT uIDCheckItem, //来确定输的选项框被选择或者设置 _In_ UINT uCheck //可选择下列选项mask);
Value- MF_BYCOMMAND
- 0x00000000L
Indicates that the uIDCheckItem parameter gives the identifier of the menu item. TheMF_BYCOMMAND flag is the default, if neither the MF_BYCOMMAND norMF_BYPOSITION flag is specified.
- MF_BYPOSITION
- 0x00000400L
Indicates that the uIDCheckItem parameter gives the zero-based relative position of the menu item.
- MF_CHECKED
- 0x00000008L
Sets the check-mark attribute to the selected state.
- MF_UNCHECKED
- 0x00000000L
Sets the check-mark attribute to the clear state.
返回值:The return value specifies the previous state of the menu item (either MF_CHECKED or MF_UNCHECKED). If the menu item does not exist, the return value is –1.
- menu API
- Struts-menu api
- Drupal7 API Menu system
- Android API Guides---Menu Resource
- EXT核心API详解Ext.menu.Menu(十七)
- [转载]EXT核心API详解Ext.menu.Menu(十七)
- EXT核心API详解(十七)-- Ext.Menu.Menu
- EXT核心API详解Ext.menu.Menu(十七)
- Menu
- Menu
- menu
- menu
- menu
- Menu
- MENU
- menu
- menu
- Menu
- 统计学习方法笔记 -- 概论
- 百度地图 定位 地图
- android 中对Resources资源的访问
- Read data:the file "Info.plist" couldn't be opened because there is no such file
- android4.2 长按POWER键3秒关机
- menu API
- android4.2 不显示锁屏同时POWER不进休眠
- pkg-config
- 结构——树
- android 4.2 修改默锁屏为无
- maven项目运行出现问题及解决方案
- Linux内核实现其对usb摄像头的支持
- android 物理键盘布局
- android 修改输入法中拼写检测默认值