Compartir a través de


CContextMenuManager::AddMenu

Adds a new shortcut menu to the CContextMenuManager.

BOOL AddMenu(
   UINT uiMenuNameResId,
   UINT uiMenuResId 
);

BOOL AddMenu(
   LPCTSTR lpszName,
   UINT uiMenuResId 
);

Parameters

  • [in] uiMenuNameResId
    A resource ID for a string that contains the name for the new menu.

  • [in] uiMenuResId
    The menu resource ID.

  • [in] lpszName
    A string that contains the name for the new menu.

Return Value

Nonzero if the method was successful; 0 if the method fails.

Remarks

This method fails if uiMenuResId is invalid or if another menu with the same name already is in the CContextMenuManager.

Requirements

Header: afxcontextmenumanager.h

See Also

Reference

CContextMenuManager Class

Hierarchy Chart