Board index » cppbuilder » Application->ProcessMessages()

Application->ProcessMessages()


2005-08-19 03:47:28 AM
cppbuilder67
Hi
I am being forced to write an application in VC++ and I am trying to mimic something I use all the time with builder.
What does application.ProcessMessages do, I would liek to do
the same using standard API.
Thanks
Marc
 
 

Re:Application->ProcessMessages()

"Marc" < XXXX@XXXXX.COM >wrote:
Quote

[...] What does application.ProcessMessages do,
It processes all of the messages that are waiting to be
processed for the main thread.
Quote
I would liek to do the same using standard API.
Look at PeekMessage.
~ JD
 

Re:Application->ProcessMessages()

"Marc" < XXXX@XXXXX.COM >wrote in message
Quote
What does application.ProcessMessages do
Pumps the main message queue for any pending messages that are awaiting
processing.
Quote
I would liek to do the same using standard API.
A message queue consists of calling Get/PeekMessage(), TranslateMessage(),
and DispatchMessage() in a loop for the lifetime of the thread. When you
pump the queue manually from elsewhere, you should not loop indefinately,
but instead break the loop as soon as the queue is cleared. Use
PeekMessage() to know if there are any messages in the queue.
Gambit
 

{smallsort}

Re:Application->ProcessMessages()

"JD" < XXXX@XXXXX.COM >wrote in message
Quote
Look at PeekMessage.
PeekMessage() only retreives a message. It does not process it.
Gambit