Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

CCmdTarget Class

class CCmdTarget : public CObject

Remarks

CCmdTarget is the base class for the Microsoft Foundation Class Library message-map architecture. A message map routes commands or messages to the member functions you write to handle them. (A command is a message from a menu item, command button, or accelerator key.)

Key framework classes derived from CCmdTarget include CView, CWinApp, CDocument, CWnd, and CFrameWnd. If you intend for a new class to handle messages, derive the class from one of these CCmdTarget-derived classes. You will rarely derive a class from CCmdTarget directly.

For an overview of command targets and OnCmdMsg routing, see Command Targets, Command Routing, and Mapping Messages.

CCmdTarget includes member functions that handle the display of an hourglass cursor. Display the hourglass cursor when you expect a command to take a noticeable time interval to execute.

Dispatch maps, similar to message maps, are used to expose OLE automation IDispatch functionality. By exposing this interface, other applications (such as Visual Basic) can call into your application. For more information on the IDispatch interfaces, see Creating the IDispatch Interface and Dispatch Interface and API Functions in the Platform SDK.

Requirements

Header: afxwin.h

See Also

MFC Sample ACDUAL

Class Members | Base Class | Hierarchy Chart | CCmdUI | CDocument | CDocTemplate | CWinApp | CWnd | CView | CFrameWnd | COleDispatchDriver

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.