GetMenuDefaultItem function
Determines the default menu item on the specified menu.
Syntax
UINT WINAPI GetMenuDefaultItem( _In_ HMENU hMenu, _In_ UINT fByPos, _In_ UINT gmdiFlags );
Parameters
- hMenu [in]
-
Type: HMENU
A handle to the menu for which to retrieve the default menu item.
- fByPos [in]
-
Type: UINT
Indicates 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]
-
Type: UINT
Indicates how the function should search for menu items. This parameter can be zero or more of the following values.
Return value
Type: UINT
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.
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- Reference
- SetMenuDefaultItem
- Conceptual
- Menus