The optimal solution I found for this case was Idle processing.
All I did is create a short function which I call from my long loops every now and then. Problem was solved, thanks for all those who contributed. Here is the function in case someone needs more clarity. NO MFC REQUIRED.
JohnCz, thanks for posting that code snippet
RegCode:void UseIdle() { MSG msg; while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { if (msg.message == WM_QUIT) { PostQuitMessage(111); break; } TranslateMessage(&msg); DispatchMessage(&msg); } //The following UpdateWindow call slows down my program ALOT //UpdateWindow(g_hWnd); }![]()
Tam


Reply With Quote