March 27th, 2013, 12:36 PM
The solution I've gone for in the end is to intervene the main frame OnClose, and stop the loop in CView before doing the actual close. Seems to work well.
Definitely going to have to attempt...
March 26th, 2013, 10:42 PM
Finally, if the user closes the application, how can I terminate the loop before it closes (otherwise it throws errors if the loop is still running.) I understand its the WM_CLOSE message in...
March 26th, 2013, 09:40 PM
Brilliant! That works great! Thank you very much :)
March 26th, 2013, 06:52 PM
if(PeekMessage(&msg,0,0,0,PM_REMOVE)) //Check for user input messages (if user is trying to stop playback)
{
if(msg.message==WM_QUIT) break;
DispatchMessage(&msg);
}
It reads...
March 26th, 2013, 05:22 PM
Well the message pumping method works, but it is buggy with UI updating etc. I think I need to start the loop in a thread. I've had a look through various tutorials on AfxBeginThread, but I can't for...
March 26th, 2013, 03:18 PM
Thanks Guys! That's been a massive help. I'll probably go with the message pumping method for now but threads are certainly something I'll have to look in to for future reference as it seems that's...
March 25th, 2013, 08:30 PM
Hi, newbie here, still very much learning.
I'm writing a piece of software in MFC. In one function, I have a while loop using "KeepLooping" as the condition.
"KeepLooping" is a boolean that is...