Delen via


CMouseManager::SetCommandForDblClk

Associates a custom command with a view that is first registered with the mouse manager.

void SetCommandForDblClk(
   int iViewId,
   UINT uiCmd 
);

Parameters

  • [in] iViewId
    The view identifier.

  • [in] uiCmd
    The command identifier.

Remarks

In order to associate a custom command with a view, you must first register the view by using CMouseManager::AddView. The AddView method requires a view identifier as an input parameter. Once you register a view, you can call CMouseManager::SetCommandForDblClk with the same view identifier input parameter that you supplied to AddView. Thereafter, when the user double-clicks the mouse in the registered view, the application will execute the command indicated by uiCmd. To support the custom mouse behavior, you will also need to customize the view registered with the mouse manager. For more information about custom mouse behavior, see Keyboard and Mouse Customization.

If uiCmd is set to 0, the specified view is no longer associated with a command.

Requirements

Header: afxmousemanager.h

See Also

Reference

CMouseManager Class

Hierarchy Chart

Concepts

Keyboard and Mouse Customization