What is the use of message map? Advantages of a message map.

What is the use of message map? Advantages of a message map. What is the use of AFX_MANAGE_STATE?

What is the use of message map? Advantages of a message map.

Any system is a message driven system. Every event has to be noted down and stored somewhere like a mouse click or a printer signal sends a message to the running application which in turn handles the message. The Microsoft Foundation Class (MFC) Library supports a message driven programming mode in which the central component is the Message Map which is used to map the message to the right process or device and allows the user to perform without any interference. It is also a very flexible and well integrated with tools such as MFC AppWizard and ClassWizard. As message maps are created from a set of macros then it allows the flexibility and functionality to be maintained and allow user to work efficiently. It has advantages of flexibility, you can store command messages, control notifications and register the messages which are going to be used later on.

What is the use of AFX_MANAGE_STATE?

AFX_MANAGE_STATE structure contains global data for the module, that is, the portion of the module state that is pushed or popped and also it is used to protect the exported function in DLL. Its syntax is like this AFX_MANAGE_STATE(AFX_MODULE_STATE* pModuleState ) where pModuleState is the pointer to the AFX_MANAGE_STATE structure. It is enable for static MFC libraries as well as MFC DLLs.
Difference between ASSERT and VERIFY.
ASSERT reads and evaluates an expression when the program is in debug mode and it throws an exception if the result is 0 and program terminates whereas VERIFY reads..........
What is the base class for MFC Framework?
CObject class is the main base class for MFC Framework. It is the mother of all other classes. Almost all classes in MFC are derived from CObject one of the exception is CString.............
Difference between GetMessage, PostMessage & PeakMessage.
GetMessage() function takes the message to the message queue and make a procedure call. Then it waits for a message to be placed..............
Post your comment