   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. ;  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://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.   ;  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? ;  Make sure that in your WM_DESTROY event handler, you have PostQuitMessage(0);   [edited by - Gladiator on December 18, 2003 6:12:21 PM]