Partager via


CContextMenuManager::GetMenuByName

Returns a handle to a specific menu.

HMENU GetMenuByName(
   LPCTSTR lpszName,
   UINT* puiOrigResID = NULL
) const;

Parameters

  • [in] lpszName
    A string that contains the name of the menu to retrieve.

  • [out] puiOrigResID
    A pointer to an UINT. This parameter contains the resource ID of the specified menu, if found.

Return Value

A handle to the menu that matches the name that was specified by lpszName. NULL if there is no menu called lpszName.

Remarks

If this method finds a menu that matches lpszName, GetMenuByName stores the menu resource ID in the parameter puiOrigResID.

Requirements

Header: afxcontextmenumanager.h

See Also

Reference

CContextMenuManager Class

Hierarchy Chart