Hi, I'm new to windows programming and am having a problem with my program not quitting properly. When I close it, the program disappears from view and the taskbar, and it looks like it's gone, but when I ctrl-alt-del it's still running, and it won't let me re-build it until I've closed it. Here are the parts of my code that I guess would be causing the problem:
---
switch(message) {
case WM_DESTROY:
PostQuitMessage(0);
break;
---
in WndProc()
and
---
bool done = false;
while(!done)
{
if(PeekMessage(&msg, hwnd, NULL, NULL, PM_REMOVE))
{
if(msg.message == WM_QUIT)
done = true;
else
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
}
return msg.wParam;
---
in WinMain().
If there's any other area of the program you need to see, just say so and I'll post it.
Thanks!