What is a message pump?

A message loop is a small piece of code that exists in any native Windows program. It roughly looks like this: MSG msg; while (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } The GetMessage() Win32 API retrieves a message from Windows. Your program typically spends 99.9% of its time there, waiting for Windows to tell … Read more

tech