GetMenuItemCount

Syntax

WORD GetMenuItemCount(hMenu)

This function determines the number of items in the menu identified by the hMenu parameter. This may be either a pop-up or a top-level menu.

Parameter Type/Description  
hMenu HMENU Identifies the handle to the menu to be examined.  

Return Value

The return value specifies the number of items in the menu specified by the hMenu parameter if the function is successful. Otherwise, it is –1.