This documentation is archived and is not being maintained.

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

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.

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.

Header: afxmenutearoffmanager.h