Cant close window
my app is acting kind of weird. whenever i press escape to close the program (im using nehe''s base code) the window closes but when i check my task manger it is still running in the background. any ideas of what i should check to fix it?
I had that too and I believe it had something to do with not correctly/completely destroying the rendering/device contexts.
I will look and see if I can find what I did to let it close properly.
I will look and see if I can find what I did to let it close properly.
- growl -
That happens when you fail to unregister the window class ( from my experience anyway )
I disagree Hawkeye3, I had a strange problem that for unknown reasons for a while unregistering my window class failed, and still the program shut down fine and didn''t continue running in the background, so it''s definetely not the fact that that''s not working
You''re not exiting the main loop. This is precisely why you need the following structure in your real-time programs:
You could also call exit(EXIT_SUCCESS) or exit(EXIT_FAILURE), but that''s not preferred.

//global varviableisRunning = true;//main loop (usually in WinMain)while(isRunning){}....//message handlerswitch(message) { case WM_CLOSE: isRunning = false; return 0; }
You could also call exit(EXIT_SUCCESS) or exit(EXIT_FAILURE), but that''s not preferred.

"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
through all of the time i have worked on this code i never touched the base code including the main loop. is it possible its my driver? i updated it before this started happening. i have a gf4ti4600 and im running the WHQL det 53.03. any ideas if that could be the problem?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement