Monday, October 22, 2007 4:05 PM
It's something i've never even really heard of, except sometimes when debugging i get a crazy exception about not pumping, click continue and all is well.
What is the 'messsage pump', what's it for, when do I use it.
Monday, October 22, 2007 8:33 PM
In general, Windows programs are essentially message handlers. Applications, the OS and hardware all generate windows "messages" that an application listens for and reacts to.
Examples are key clicks (key down & key up), mouse move, paint and dozens of others.
A Win32 message pump typically looks something this and was the heart of win32 programming.:
while(GetMessage(&msg, hwnd, 0, 0))
// do stuff
Today, the C# language tends to abstract the message pump away but you can still get to it.
protected override void WndProc(ref Message m)
// do stuff
Wednesday, April 23, 2008 12:58 AMC# does not have message loop, message pump.In Namespace: System.Windows.Forms, System.Windows.Forms.Application class replace the message loop.This class provides static methods and properties to manage an application such as methods to start, stopapplication, process windows messages and properties to get information about an application.I need a kickstart on C#, correct me if i am wrong.1) It does not have InitInstance as in C++2) It does not have message mapping as in C++3) It does not have COM mapping as in C++4) It does not have a pointer called m_pMainWnd pointer to the main app WndIn C#, everything is wrap inside, thus you can say that C# is not as flexible as C++.