Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Brian Jones

App isn't closing

This topic is 5544 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is a really weird problem for me. None of my apps (OpenGL) respond to ESC, the close button, or alt-f4 ANYMORE. I''ve been using the same WindowProc for over a year now. The only thing I''ve done recently was delete the intermediate files VC creates when building the .exe to free up disk space. Any idea?

Share this post


Link to post
Share on other sites
Advertisement
I know you say you''ve been using the same window proc, but you may want to look at how that works. I had to mess around a bit with my WM_CLOSE and WM_DESTROY a little when I was starting with win32. Maybe you should post code.

Brian J

Share this post


Link to post
Share on other sites
I think the title of my topic is misleading. But I''ll post the link to the code for what I''m using. Here:
http://home.earthlink.net/~bjonesds12/Programming/Misc/Source/SetupWindow.cpp Scroll all the way down to PreDefWindowProc().

I''m pretty sure it has nothing to do with the code. What I''m saying is, yesterday I could exit out ALL my apps using ESC, ALT+F4, or by clicking the close button. Now I can''t as the window seems to be ingnoring my requests. There have been no code changes to any of my apps. Especially none to the window procedure. All I have done today dealing with programming is deleting the intermediate files Visual C++ creates, and I have installed the Microsoft Speech API. Thats all I''ve done.

Share this post


Link to post
Share on other sites
While I'm not sure whether that's the problem or not, this:


case WM_CLOSE:
    {
        PostMessage(hWnd, WM_DESTROY, 0, 0);

        return (0);
    }break;


...is not the proper way to handle WM_CLOSE and could very well lead to problems (if not now, it may in the future). You should call DestroyWindow rather than posting a WM_DESTROY message.

[edited by - spock on April 19, 2003 3:05:05 AM]

Share this post


Link to post
Share on other sites
In fact, when app isn''t running is a problem.
When app is NOT closing it is NOT a problem.

I would just display message:
AfxMessageBox("Now please shut down your application");

user can press ctrl+alt+del and shut it down.

Please AGREE or I will LIBERATE you

Share this post


Link to post
Share on other sites
Awww, I said screw it, and just reformmated my harddrive. I really don''t think it''s problems with the windowproc though. I used to have problems by NOT posting a WM_DESTROY message. But if something goes wrong, I''ll bump this thread back up, and start complaining again. Or maybe I''ll create a new initialization library.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!