Export (0) Print
Expand All

CMenu::FromHandle

Returns a pointer to a CMenu object given a Windows handle to a menu.

static CMenu* PASCAL FromHandle( 
   HMENU hMenu  
);

hMenu

A Windows handle to a menu.

A pointer to a CMenu that may be temporary or permanent.

If a CMenu object is not already attached to the Windows menu object, a temporary CMenu object is created and attached.

This temporary CMenu object is only valid until the next time the application has idle time in its event loop, at which time all temporary objects are deleted.

See the example for CMenu::CreateMenu.

Header: afxwin.h

Show:
© 2014 Microsoft