Through WM_COMMAND i call a function that will process something and put out results to a listbox.
Im trying to call
Code:
// inside the lengthy function
while(PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
{
if (msg.message == WM_QUIT)
break;
TranslateMessage (&msg) ;
DispatchMessage (&msg) ;
}
UpdateWindow(hWnd);
RedrawWindow(hWnd, 0, 0,
RDW_INVALIDATE | RDW_ERASE | RDW_ERASENOW | RDW_UPDATENOW);
to update the listbox but apparently its not enough or I dont call PeekMessage the right way.
I dont know where should i put PeekMessage?
Right now I use GetMessage also in WinMain.