tayaholdings.blogg.se

Configure ccmenu
Configure ccmenu





configure ccmenu

When nIDNewItem specifies a pop-up menu, it becomes part of the menu to which it is appended. The application can specify the state of the menu item by setting values in nFlags. Nonzero if the function is successful otherwise 0. Points to a CBitmap object that will be used as the menu item. The lpszNewItem parameter is ignored (not needed). The value is stored in the itemData member of the structure supplied with those messages.Ĭontains a pointer to a null-terminated string. This 32-bit value is available to the application when it processes WM_MEASUREITEM and WM_DRAWITEM messages. The nFlags parameter is used to interpret lpszNewItem in the following way: nFlagsĬontains an application-supplied 32-bit value that the application can use to maintain additional data associated with the menu item. Specifies the content of the new menu item. The nIDNewItem parameter is ignored (not needed) if nFlags is set to MF_SEPARATOR. Specifies either the command ID of the new menu item or, if nFlags is set to MF_POPUP, the menu handle ( HMENU) of a pop-up menu. It consists of one or more of the values listed in the Remarks section. Specifies information about the state of the new menu item when it is added to the menu. Inheritance HierarchyĪppends a new item to the end of a menu. You can use the LoadMenuIndirect member function to create a menu from a template in memory, but a menu created from a resource by a call to LoadMenu is more easily maintained, and the menu resource itself can be created and modified by the menu editor. The menu itself is automatically destroyed when the window is destroyed. The call to Detach detaches the HMENU from the CMenu object, so that when the local CMenu variable passes out of scope, the CMenu object destructor does not attempt to destroy a menu it no longer owns. The CWnd::SetMenu member function sets the window's menu to the new menu, causes the window to be redrawn to reflect the menu change, and also passes ownership of the menu to the window. Next, call CWnd::SetMenu to set the menu to a window, followed immediately by a call to the CMenu object's Detach member function. It provides member functions for creating, tracking, updating, and destroying a menu.Ĭreate a CMenu object on the stack frame as a local, then call CMenu's member functions to manipulate the new menu as needed.

#CONFIGURE CCMENU WINDOWS#

Specifies the handle to the Windows menu attached to the CMenu object. Sets the help context ID to be associated with the menu.Īssociates the specified check-mark bitmaps with a menu item.ĭisplays a floating pop-up menu at the specified location and tracks the selection of items on the pop-up menu.ĭetermines if two menu objects are not equal.ĭetermines if two menu objects are equal. Sets the default menu item for the specified menu. Loads a menu from a menu template in memory and attaches it to a CMenu object.Ĭalled by the framework to determine menu dimensions when an owner-drawn menu is created.Ĭhanges an existing menu item at the specified position.ĭeletes a menu item with an associated pop-up menu from the specified menu. Loads a menu resource from the executable file and attaches it to a CMenu object. Inserts a new menu item at the specified position in a menu.

configure ccmenu

Inserts a new menu item at the specified position, moving other items down the menu. Returns the m_hMenu wrapped by this CMenu object. Retrieves the label of the specified menu item. Returns the status of the specified menu item or the number of items in a pop-up menu. Obtains the menu-item identifier for a menu item located at the specified position. Retrieves information on a specific menu.ĭetermines the number of items in a pop-up or top-level menu. Retrieves the help context ID associated with the menu.

configure ccmenu

Returns a pointer to a CMenu object given a Windows menu handle.ĭetermines the default menu item on the specified 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.ĭeletes any temporary CMenu objects created by the FromHandle member function.ĭestroys the menu attached to a CMenu object and frees any memory that the menu occupied.ĭetaches a Windows menu handle from a CMenu object and returns the handle.Ĭalled by the framework when a visual aspect of an owner-drawn menu changes.Įnables, disables, or dims (grays) a menu item. Places a radio button next to a menu item and removes the radio button from all of the other menu items in the group.Ĭreates an empty menu and attaches it to a CMenu object.Ĭreates an empty pop-up menu and attaches it to a CMenu object.ĭeletes a specified item from the menu. Places a check mark next to or removes a check mark from a menu item in the pop-up menu. Syntax class CMenu : public CObjectĪppends a new item to the end of this menu.Īttaches a Windows menu handle to a CMenu object.







Configure ccmenu