Поделиться через


CWnd::SetMenu

Sets the current menu to the specified menu.

BOOL SetMenu(
   CMenu* pMenu 
);

Параметры

  • pMenu
    Identifies the new menu. If this parameter is NULL, the current menu is removed.

Возвращаемое значение

Nonzero if the menu is changed; otherwise 0.

Заметки

Causes the window to be redrawn to reflect the menu change.

SetMenu will not destroy a previous menu. An application should call the CMenu::DestroyMenu member function to accomplish this task.

Пример

See the example for CMenu::LoadMenu.

Требования

Header: afxwin.h

См. также

Основные понятия

CWnd Class

CWnd Members

Hierarchy Chart

CMenu::DestroyMenu

CMenu::LoadMenu

SetMenu

CWnd::GetMenu