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


CMenu::Detach

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

HMENU Detach( );

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

The handle, of type HMENU, to a Windows menu, if successful; otherwise NULL.

Заметки

The m_hMenu data member is set to NULL.

Пример

CMenu mnu;
HMENU hmnu = AfxGetMainWnd()->GetMenu()->GetSafeHmenu();
mnu.Attach(hmnu);

// Now you can manipulate the window's menu as a CMenu
// object...

mnu.Detach();

Требования

Header: afxwin.h

См. также

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

CMenu Class

CMenu Members

Hierarchy Chart

CMenu::Attach