I'm converting a C++ application to C# and I've come across this single line of code in numerous places in the codebase:
Application->ProcessMessages()
I found this link: http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/Forms_TApplication_ProcessMessages.html
Which says ProcessMessages()
does the following:
Call ProcessMessages to permit the application to process messages that are currently in the message queue. ProcessMessages cycles the Windows message loop until it is empty, and then returns control to the application.
But what is a "message" and what is the "message queue"? How do messages get added? What sort of processing is done?
I can't seem to find any concrete explanations as to what this does, which is important because I don't know what would be the C# / .NET equivalent of this method call, or is it its functionality in some shape or way just baked into .NET and I don't need to do anything?
Tagged question with C# since I'm most curious about its .NET equivalent, but the real intent of the thread is simply to understand what this does as far as C++ is concerned.