Message Maps


Message Maps

Message Maps - the Microsoft Foundation Class Library message map facility.

Microsoft Windows implements what are essentially virtual functions in window classes using its messaging facility. Due to the large number of messages involved, providing a separate virtual function for each Windows message results in a prohibitively large vtable.

MFC provides an alternative to the switch statement used in traditional Windows programs to handle messages sent to a window. A mapping from messages to member-functions may be defined so that when a message is to be handled by a window, the appropriate member function is called automatically. This message-map facility is designed to be similar to virtual functions but has additional benefits not possible with C++ virtual functions.

Message Maps, maps the user action in to the appropriate MFC class functions to handle it. The MFC Class which can handle message should be member of CCmdTarget, (i.e) it should be hierarchically derived from CCmdTarget.

The advantage of Message Map is the same action can be mapped to more than one MFC class function.

It is similar to handling the messages in SDK application using WndProc callback functions, but in MFC with the help OOPS concepts

References

http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarw98bk/html/messageloopalternatives.asp


Wikimedia Foundation. 2010.

Look at other dictionaries:

  • Live Search Maps — Infobox Software name = Live Search Maps caption = Virtual Earth 3D within Live Search Maps developer = Microsoft latest release version = v7 latest release date = April 10 2008 latest preview version = latest preview date = operating system =… …   Wikipedia

  • Bing Maps — Bing Maps …   Wikipedia

  • Pictorial maps — Recent example of Watercolour ink Geopictorial style illustrated map by Jean Louis Rheault Pictorial maps are a category of maps that are also loosely called illustrated maps, panoramic maps, perspective maps, bird’s eye view maps and… …   Wikipedia

  • New Maps of Hell — Not to be confused with New Maps of Hell, the study of science fiction by Kingsley Amis New Maps of Hell Studio album by Bad Re …   Wikipedia

  • No Maps for These Territories — DVD cover for the documentary Directed by Mark Neale …   Wikipedia

  • Traffic Message Channel — (TMC) is a technology for delivering traffic and travel information to drivers. It is typically digitally coded using the FM RDS system on conventional FM radio broadcasts. It can also be transmitted on DAB or satellite radio.It allows silent… …   Wikipedia

  • Traffic Message Channel — Содержание 1 Как это работает 2 Безопасность 3 Действующие службы передачи дорожной …   Википедия

  • Microsoft Foundation Class Library — Developer(s) Microsoft Initial release 1992 Stable release 10.0.40219.1 [1] …   Wikipedia

  • iOS version history — Contents 1 Overview 2 Versions 2.1 Unreleased versions …   Wikipedia

  • Google's hoaxes — TISP redirects here. For the space program, see Teacher in Space Project. Google has a tradition of perpetrating April Fools Day hoaxes. Contents 1 April Fool s hoaxes 1.1 2000 1.2 2002 …   Wikipedia