Freigeben über


CMenu::FromHandle

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

static CMenu* PASCAL FromHandle(
   HMENU hMenu 
);

Parameters

  • hMenu
    A Windows handle to a menu.

Return Value

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

Remarks

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.

Example

See the example for CMenu::CreateMenu.

Requirements

Header: afxwin.h

See Also

Reference

CMenu Class

Hierarchy Chart

Other Resources

CMenu Members