Dela via


CMenuTearOffManager Class

Manages tear-off menus. A tear-off menu is a menu on the menu bar. The user can remove a tear-off menu from the menu bar, causing the tear-off menu to float.

class CMenuTearOffManager : public CObject

Members

Public Constructors

Name

Description

CMenuTearOffManager::CMenuTearOffManager

Constructs a CMenuTearOffManager object.

Public Methods

Name

Description

CMenuTearOffManager::Build

 

CMenuTearOffManager::GetRegPath

 

CMenuTearOffManager::Initialize

Initializes a CMenuTearOffManager object.

CMenuTearOffManager::IsDynamicID

 

CMenuTearOffManager::Parse

 

CMenuTearOffManager::Reset

 

CMenuTearOffManager::SetInUse

 

CMenuTearOffManager::SetupTearOffMenus

 

Remarks

In order to use tear-off menus in your application, you must have a CMenuTearOffManager object. In most cases, you won't create or initialize a CMenuTearOffManager object directly. This is handled for you when you call the CWinAppEx::EnableTearOffMenus function.

Example

The following example demonstrates how to construct and initialize a CMenuTearOffManager object by calling the CWinAppEX::EnableTearOffMenus method. This code snippet is part of the WordPad Sample: MFC WordPad Application.

// The EnableTearOffMenus method is inherited from the CWinAppEx class.
    EnableTearOffMenus (NULL, ID_FREE_TEAROFF1, ID_FREE_TEAROFF2);

Inheritance Hierarchy

CObject

   CMenuTearOffManager

Requirements

Header: afxmenutearoffmanager.h

See Also

Concepts

MFC Hierarchy Chart

Reference

CWinAppEx Class

Other Resources

Classes (MFC Feature Pack)