The GetMenuItemCount function determines the number of items in the specified menu.
Syntax
int GetMenuItemCount(
HMENU hMenu
);
Parameters
- hMenu
-
[in] Handle to the menu to be examined.
Return Value
If the function succeeds, the return value specifies the number of items in the menu.
If the function fails, the return value is -1. To get extended error information, call GetLastError.
Example
For an example, see Example of Menu-Item Bitmaps.
Function Information
| Minimum DLL Version | user32.dll |
|---|
| Header | Declared in Winuser.h, include Windows.h |
|---|
| Import library | User32.lib |
|---|
| Minimum operating systems |
Windows 95, Windows NT 3.1 |
|---|
See Also