GetMenuBarInfo function
Retrieves information about the specified menu bar.
Syntax
BOOL WINAPI GetMenuBarInfo( _In_ HWND hwnd, _In_ LONG idObject, _In_ LONG idItem, _Inout_ PMENUBARINFO pmbi );
Parameters
- hwnd [in]
-
Type: HWND
A handle to the window (menu bar) whose information is to be retrieved.
- idObject [in]
-
Type: LONG
The menu object. This parameter can be one of the following values.
Value Meaning - OBJID_CLIENT
- ((LONG)0xFFFFFFFC)
The popup menu associated with the window.
- OBJID_MENU
- ((LONG)0xFFFFFFFD)
The menu bar associated with the window (see the GetMenu function).
- OBJID_SYSMENU
- ((LONG)0xFFFFFFFF)
The system menu associated with the window (see the GetSystemMenu function).
- idItem [in]
-
Type: LONG
The item for which to retrieve information. If this parameter is zero, the function retrieves information about the menu itself. If this parameter is 1, the function retrieves information about the first item on the menu, and so on.
- pmbi [in, out]
-
Type: PMENUBARINFO
A pointer to a MENUBARINFO structure that receives the information. Note that you must set the cbSize member to
sizeof(MENUBARINFO)before calling this function.
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, 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
- GetMenu
- GetSystemMenu
- MENUBARINFO
- Conceptual
- Menus