Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between GetMessage and PeekMessage ?

Answers were Sorted based on User's Feedback



What is the difference between GetMessage and PeekMessage ? ..

Answer / girish tryambake

The major difference between the two is that GetMessage()
doesn't return until it finds a message to retrieve from the
Application Queue, this allows us to free up precious CPU
usage for other programs to use. PeekMessage() returns
immediately weather there are any messages or not, this
allows us to utilize the time between messages, for example
to render a 3D scene.

Is This Answer Correct ?    29 Yes 4 No

What is the difference between GetMessage and PeekMessage ? ..

Answer / sandeep

GetMessage essentially waits for any message to be placed in
the queue
before it returns. On other hadn, PeekMessage function does
not wait.
That means GetMessage can block until the message appears in
the queue.

Is This Answer Correct ?    21 Yes 1 No

What is the difference between GetMessage and PeekMessage ? ..

Answer / amol lande

GetMessage:
a. It retrieves the message from the calling thread's message queue.
b. It blocks until it gets a message or an error occurs.
c. It can filter message as per specified filter.
PeekMessage:
a. It checks for the message in the calling thread's message queue and it retrieves the message if any present.
b. As specified in the argument, it may or may not removes the message from message queue.
c. It returns immediately if there is no message found in the message queue.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More MFC Interview Questions

What is LoadLibrary function returns?

7 Answers  


1) How do you Destroy a Dialog Box ?

2 Answers   Honeywell,


What?s the difference between Modal and Modeless Dialog?

12 Answers   Jekson, Usl India,


What is Thread ?(VC++)What is the difference between Cmutex and Csemaphone?

5 Answers   Atos Origin,


I want recent paper pattern for HP company?

0 Answers   HP,


What is the use of UpdateData funciton ?

7 Answers  


What is a message map, and what is the advantage of a message map over virtual functions?

1 Answers  


Hi can anyone explain about the synchronization objects types and where we are using in the code.

1 Answers  


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

4 Answers  


how to repaint when working with horizontal scroll bar

0 Answers  


How we call a dialog in another dialog?

2 Answers  


Whats is DDX & DDV in MFC?

1 Answers   HCL,


Categories