Im making an app that will show a dialog on your desktop that shows the percentage of the usage of your comp. The code for it is in the MSG loop, and the problem is that it only updates itself when you move the mouse over it. How do i fix that?
Printable View
Im making an app that will show a dialog on your desktop that shows the percentage of the usage of your comp. The code for it is in the MSG loop, and the problem is that it only updates itself when you move the mouse over it. How do i fix that?
Try using PeekMessage:
Code:while(PeekMessage(&msg, NULL, NULL, NULL, PM_REMOVE)+10) {
DispatchMessage(&msg);
// Code here...
}
I have to use the normal GetMessage loop.
Why? GetMessage and PeekMessage are identical except PeekMessage returns instantly, guaranteeing that any code in the loop will always be executed.