Bagikan melalui


CMouseManager Class

Allows a user to associate different commands with a particular CView object when the user double-clicks inside that view.

class CMouseManager : public CObject

Members

Public Methods

Name

Description

CMouseManager::AddView

Adds a CView object to the Customization dialog box. The Customization dialog box enables the user to associate a double-click with a command for each of the listed views.

CMouseManager::GetViewDblClickCommand

Returns the command that is executed when the user double-clicks inside the provided view.

CMouseManager::GetViewIconId

Returns the icon associated with the provided view ID.

CMouseManager::GetViewIdByName

Returns the view ID associated with the provided view name.

CMouseManager::GetViewNames

Retrieves a list of all added view names.

CMouseManager::LoadState

Loads the CMouseManager state from the Windows registry.

CMouseManager::SaveState

Writes the CMouseManager state to the Windows registry.

CMouseManager::SetCommandForDblClk

Associates the provided command and the provided view.

Remarks

The CMouseManager class maintains a collection of CView objects. Each view is identified by a name and by an ID. These views are shown in the Customization dialog box. The user can change the command that is associated with any view through the Customization dialog box. The associated command is executed when the user double-clicks in that view. To support this from a coding perspective, you must process the WM_LBUTTONDBLCLK message and call the CWinAppEx::OnViewDoubleClick function in the code for that CView object..

You should not create a CMouseManager object manually. It will be created by the framework of your application. It will also be destroyed automatically when the user exits the application. To get a pointer to the mouse manager for your application, call CWinAppEx::GetMouseManager.

Inheritance Hierarchy

CObject

   CMouseManager

Requirements

Header: afxmousemanager.h

See Also

Reference

Hierarchy Chart

CWinAppEx Class

Concepts

Keyboard and Mouse Customization

Other Resources

MFC Classes