CCmdTarget is the parent class for the Microsoft Foundation Class Library message-map architecture. A message map routes commands or user messages to the member functions developers write to handle them. A command is a message from a menu item, command button, or accelerator key. These messages are generated when user does any activities with input devices or sometimes it comes from the backend of GUI server as operating system events.
Major framework classes derived from CCmdTarget include, CWinApp, CWnd, and CFrameWnd and CDocument, CView. Developers need not to derive classes from CCmdTarget to handle messages. However the above classes are already derived from CCmdTarget and available in MFC framework. So a class derived from CCmdTarget directly and getting used in an application is rarely.
Command or messages are routed through OnCmdMsg which is the main function in CCmdTarget. This mechanism is also known as Command Routing or message routing.
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.
You have viewed 1 page out of 109. Your VC++ learning is 0.00% complete. Login to check your learning progress.
Similar topics related to this section
Programming Windows, Fifth Edition (Developer Reference)
Programming Applications for Microsoft Windows (Microsoft Programming Series)
Programming Windows with MFC, Second Edition
Visual C++ Programming
Programming Microsoft Visual C++, Fifth Edition
| #1 webmaster Sun 27 Apr/2014 04:46:42(GMT) || 0 || 0|
We are pleased to inform you that a forum/blog has been incorporated with www.mybestnotes.co.in. You are welcomed to add your comments, requests, codes, solutions and feedback to it. Please login(if already a member) or signup(for free) to avail to this facility.
Your message goes here: