This documentation is archived and is not being maintained.

CMenu Members 

Base Class Members

Data Members

Construction/Destruction

Initialization

Menu Operations

Menu Item Operations

Overridables

Base Class Members

CObject Members

Data Members

m_hMenu

Specifies the handle to the Windows menu attached to the CMenu object.

Construction

CMenu

Constructs a CMenu object.

Initialization

Attach

Attaches a Windows menu handle to a CMenu object.

CreateMenu

Creates an empty menu and attaches it to a CMenu object.

CreatePopupMenu

Creates an empty pop-up menu and attaches it to a CMenu object.

DeleteTempMap

Deletes any temporary CMenu objects created by the FromHandle member function.

DestroyMenu

Destroys the menu attached to a CMenu object and frees any memory that the menu occupied.

Detach

Detaches a Windows menu handle from a CMenu object and returns the handle.

FromHandle

Returns a pointer to a CMenu object given a Windows menu handle.

GetSafeHmenu

Returns the m_hMenu wrapped by this CMenu object.

LoadMenu

Loads a menu resource from the executable file and attaches it to a CMenu object.

LoadMenuIndirect

Loads a menu from a menu template in memory and attaches it to a CMenu object.

Menu Operations

DeleteMenu

Deletes a specified item from the menu. If the menu item has an associated pop-up menu, destroys the handle to the pop-up menu and frees the memory used by it.

TrackPopupMenu

Displays a floating pop-up menu at the specified location and tracks the selection of items on the pop-up menu.

TrackPopupMenuEx

Displays a floating pop-up menu at the specified location and tracks the selection of items on the pop-up menu.

Menu Item Operations

AppendMenu

Appends a new item to the end of this menu.

CheckMenuItem

Places a check mark next to or removes a check mark from a menu item in the pop-up menu.

CheckMenuRadioItem

Places a radio button next to a menu item and removes the radio button from all of the other menu items in the group.

EnableMenuItem

Enables, disables, or dims (grays) a menu item.

GetDefaultItem

Determines the default menu item on the specified menu.

GetMenuContextHelpId

Retrieves the help context ID associated with the menu.

GetMenuInfo

Retrieves information on a specific menu.

SetMenuInfo

Sets information on a specific menu.

GetMenuItemCount

Determines the number of items in a pop-up or top-level menu.

GetMenuItemID

Obtains the menu-item identifier for a menu item located at the specified position.

GetMenuItemInfo

Retrieves information about a menu item.

GetMenuState

Returns the status of the specified menu item or the number of items in a pop-up menu.

GetMenuString

Retrieves the label of the specified menu item.

GetSubMenu

Retrieves a pointer to a pop-up menu.

InsertMenu

Inserts a new menu item at the specified position, moving other items down the menu.

InsertMenuItem

Inserts a new menu item at the specified position in a menu.

ModifyMenu

Changes an existing menu item at the specified position.

RemoveMenu

Deletes a menu item with an associated pop-up menu from the specified menu.

SetDefaultItem

Sets the default menu item for the specified menu.

SetMenuContextHelpId

Sets the help context ID to be associated with the menu.

SetMenuItemBitmaps

Associates the specified check-mark bitmaps with a menu item.

SetMenuItemInfo

Changes information about a menu item.

Overridables

DrawItem

Called by the framework when a visual aspect of an owner-drawn menu changes.

MeasureItem

Called by the framework to determine menu dimensions when an owner-drawn menu is created.

Operators

operator !=

Determines if two menu objects are not equal.

operator ==

Determines if two menu objects are not equal.

operator HMENU

Retrieves the handle of the menu object.

See Also

Show: