GetMenuItemCount Function

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 Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systems Windows 95, Windows NT 3.1

See Also

Tags :


Page view tracker