Detaches a Windows menu from a CMenu object and returns the handle.
The handle, of type HMENU, to a Windows menu, if successful; otherwise NULL.
The m_hMenu data member is set to NULL.
HMENU hmnu = AfxGetMainWnd()->GetMenu()->GetSafeHmenu();
mnu.Attach( hmnu );
// Now you can manipulate the window's menu as a CMenu
hmnu = mnu.Detach();
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback