网站首页  词典首页

请输入您要查询的函数:

 

术语 getmenudefaultitem
释义 GetMenuDefaultItem
语法:
UINT GetMenuDefaultItem( HMENU hMenu,
UINT fByPos,
UINT gmdiFlags
);
GetMenuDefaultItem功能
该GetMenuDefaultItem函数确定指定的菜单上的默认的菜单项。
参数
hMenu
[in]句柄菜单的检索默认的菜单项。
fByPos
[in]指定是否检索菜单项的标识符或其立场。如果此参数为FALSE,则返回的标识符。否则,返回的立场。
gmdiFlags
[in]指定如何为菜单项的功能搜索。此参数可以是零个或多个下列值。
GMDI_GOINTOPOPUPS
规定,如果默认的项目之一,打开一个菜单,该功能是在相应的搜索菜单递归。如果没有默认菜单项,返回值确定的项目,打开子菜单。默认情况下,该函数返回指定的菜单上的第一个预设项目,无论是一个项目,打开子菜单。
GMDI_USEDISABLED
指定该函数返回一个默认的项目,即使它被禁用。默认情况下,残疾或功能跳过变灰项目。
返回值
如果函数成功,返回值是标识或菜单项的位置。
如果函数失败,返回值为-1。为了获得更多错误信息,调用GetLastError。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 4.0
参见
菜单,SetMenuDefaultItem
==英文原文==GetMenuDefaultItem Function
The GetMenuDefaultItem function determines the default menu item on the specified menu.
Syntax
UINT GetMenuDefaultItem( HMENU hMenu,
UINT fByPos,
UINT gmdiFlags
);
Parameters
hMenu
[in] Handle to the menu for which to retrieve the default menu item.
fByPos
[in] Specifies whether to retrieve the menu item's identifier or its position. If this parameter is FALSE, the identifier is returned. Otherwise, the position is returned.
gmdiFlags
[in] Specifies how the function searches for menu items. This parameter can be zero or more of the following values.
GMDI_GOINTOPOPUPS
Specifies that if the default item is one that opens a submenu, the function is to search recursively in the corresponding submenu. If the submenu has no default item, the return value identifies the item that opens the submenu. By default, the function returns the first default item on the specified menu, regardless of whether it is an item that opens a submenu.
GMDI_USEDISABLED
Specifies that the function is to return a default item, even if it is disabled. By default, the function skips disabled or grayed items.
Return Value
If the function succeeds, the return value is the identifier or position of the menu item.
If the function fails, the return value is -1. To get extended error information, call GetLastError .
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 , SetMenuDefaultItem
==原始网址==http://msdn.microsoft.com/en-us/library/ms647976(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:24:39