Active a event while in a while loop ??
-
Hi, i am writing a program which produces a constant square wave form from Parallel port. I am doing this in a infinite while loop, the problem is i also want something to happen when i click a button on the dialog. How do i keep the loop runing and still be able to click a button? THANKS
-
Hi, i am writing a program which produces a constant square wave form from Parallel port. I am doing this in a infinite while loop, the problem is i also want something to happen when i click a button on the dialog. How do i keep the loop runing and still be able to click a button? THANKS
-
Check Subject below "App still works but GUI does not update when moved." Papa while (TRUE) Papa.WillLove ( Bebe ) ;
-
Hi, i am writing a program which produces a constant square wave form from Parallel port. I am doing this in a infinite while loop, the problem is i also want something to happen when i click a button on the dialog. How do i keep the loop runing and still be able to click a button? THANKS
Yes you should put your loop in a thread but if youu want something quick and dirty, call the following function (DoEvents) in your loop.
BOOL DoEvents() { MSG msg; while (::PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { if (msg.message == WM_QUIT) { return FALSE; } if (!AfxGetApp()->PreTranslateMessage(&msg)) { ::TranslateMessage(&msg); ::DispatchMessage(&msg); } } return TRUE; }