Differ GetMessage, PostMessage & PeakMessage?

Answers were Sorted based on User's Feedback



Differ GetMessage, PostMessage & PeakMessage?..

Answer / boggarapu sateesh kumar

GetMessage function waits for a message to be placed in the
queue before returning.

PeekMessage function does not wait for a message to be
placed in the queue before returning.

The PostMessage function places (posts) a message in the
message queue associated with the thread that created the
specified window and then returns without waiting for the
thread to process the message.

Is This Answer Correct ?    16 Yes 3 No

Differ GetMessage, PostMessage & PeakMessage?..

Answer / krishna

GetMessage() will retrives the message from the running
message queue and The function dispatches incoming sent
messages until a posted message is available for retrieval.

PeekMEssage() retrieves the message from running message
queue but will not remove the message information from the
message queue.

PostMessage() Posts the message to the message queue and
returns.

Is This Answer Correct ?    8 Yes 2 No

Differ GetMessage, PostMessage & PeakMessage?..

Answer / sirama

GetMessage() Takes the message from "Message Queue" and
dispatches it to the Window Procedure. And the pointer
moves to the next message in the queue.

PeekMessage() does the same. But, this time, the pointer is
not moved to the next message in the Queue.

PostMessage() : See Krishna's Answer

Is This Answer Correct ?    3 Yes 0 No

Differ GetMessage, PostMessage & PeakMessage?..

Answer / rao naeem

PostMessage is used in Threading usually. to post a message
to Messaging Queue.


Get message is a blocking call it waits for the message
untill it recieve the message it was requiring


Peak message doesnt wait for the message particually it is
looking it just look if the particular message is not in the
queue it returns.

Is This Answer Correct ?    9 Yes 7 No

Post New Answer

More MFC Interview Questions

What is a critical section and how is it implemented?

2 Answers  


Q1. A. What is unary operator? List out the different operators involved in the unary operator. B. What is an adjust field format flag? Q2. A. Distinguish between a # include and #define. B. Can a list of string be stored within a two dimensional array? Q3. A. Explain how a pointer to function can be declared in C++? B. List the merits and demerits of declaring a nested class in C++? Q4. A. What are the syntactic rules to be avoid ambiguity in multiple inheritence? B. Explain the operation of overloading of an assignment operator. Q5. A. Explain how the virtual base class is different from the conventional base classes of the opps. B. Explain how an exception handler is defined and invoked in a Program. Q6. A. What is a binary file? List the merits and demerits of the binary file usagein C++. B. Write short notes on Text Manipulation Routines. C. Write bites in Turbo c++ Header ("Include") Files.

3 Answers   ABC, HCL, Infosys,


1)How to change the size of a button at run time ?

1 Answers  


how u can move CDC pointer to one line in cview?

2 Answers  


what is message loop how mfc does it internally?

4 Answers   Aspire,






What is document-view architecture ? Give me one real time example for SDI ?

2 Answers  


What is CSingleDocTemplate?

1 Answers  


How many types of dialog box are their

10 Answers   Honeywell,


How to find the mouse entering an image?..while entering need to display next image...

4 Answers  


What types of threads are supported by MFC framework?

2 Answers  


How to convert a CString variable to char* or LPTSTR?

5 Answers   Dover,


1)How to create ToolTip in MFC?

2 Answers  


Categories