Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
Resources
Menus
Menu Reference
Functions
 GetMenuItemCount Function

  Switch on low bandwidth view
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 What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker