Difference between GetMessage, PostMessage & PeakMessage. What is #progma and where it is used? What is the difference between SDI and MDI?
Difference between GetMessage, PostMessage & PeakMessage. 25. What is #progma and where it is used?GetMessage() function takes the message to the message queue and make a procedure call. Then it waits for a message to be placed in the queue before returning. Then the pointer moves to the next message. This continuously seeks the message in the queue.
PeekMessage() function performs the same function as the GetMessage() but then the pointer does not move to the next message in the Queue. It is used to seek a particular message.
The PostMessage() function places (posts) a message in the message queue and then returns without waiting.
#pragma directive is an instruction to the compiler and is ignored during the preprocessing and it is also used to control the actions of the compiler in a particular portion of a translation unit without affecting the translation unit as a whole.
It is included in the beginning for example like this
#pragma COPYRIGHT "string"
What is the difference between SDI and MDI?SDI is called as Single Document interface which is used to load only one document at a time, but it can have multiple views in the same window using splitter windows property. For example is a notepad in windows.
MDI is also called as Multiple Document Interface which has multiple child windows, each of have an individual document. For example Microsoft Word.