SetMenuDefaultItem function
Sets the default menu item for the specified menu.
Syntax
BOOL WINAPI SetMenuDefaultItem( _In_ HMENU hMenu, _In_ UINT uItem, _In_ UINT fByPos );
Parameters
- hMenu [in]
-
Type: HMENU
A handle to the menu to set the default item for.
- uItem [in]
-
Type: UINT
The identifier or position of the new default menu item or -1 for no default item. The meaning of this parameter depends on the value of fByPos.
- fByPos [in]
-
Type: UINT
The meaning of uItem. If this parameter is FALSE, uItem is a menu item identifier. Otherwise, it is a menu item position. See About Menus for more information.
Return value
Type: BOOL
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.
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
- GetMenuDefaultItem
- Conceptual
- Menus