CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    May 1999
    Posts
    20

    Capturing windows exit

    I'm trying to put a check into the exit routine for my application. I've trapped the ID_APP_EXIT command for 'File Exit' from the menu, but I'm unable to capture either ALT F4 or either of the application title bar exit buttons.

    Can anyone help, as I can't trust the users to close the application using File Exit every time!

    Carnegie


  2. #2
    Join Date
    May 1999
    Posts
    42

    Re: Capturing windows exit

    Trap the WM_QUIT message and do what you need before passing it on.


  3. #3
    Join Date
    May 1999
    Posts
    20

    Re: Capturing windows exit

    Yeah - that's what I thought.

    It doesn't seem to work!
    Should I be capturing on the CWinApp or on the CMDIMainFrame - or somewhere else entirely?


  4. #4
    Join Date
    May 1999
    Location
    Sydney, Australia
    Posts
    420

    Re: Capturing windows exit

    Maybe try to catch WM_CLOSE on the main window?


  5. #5
    Join Date
    May 1999
    Posts
    20

    Re: Capturing windows exit

    Yeah - I got it to work by capturing WM_CLOSE on the Main Frame


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured