CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Ending app

  1. #1
    Join Date
    May 1999
    Posts
    3

    Ending app

    Hi,

    When my SDI application can't connect to its database, which is done in the Document class, it must end. How can this be done? I've tried PostQuitMessage en SendMessgage(WM_CLOSE), but they don't work, I think because the window is't created yet.

    Thanks in advance,

    Stijn


  2. #2
    Join Date
    May 1999
    Posts
    4

    Re: Ending app

    Try SendMessage(WM_QUIT)


  3. #3
    Join Date
    May 1999
    Posts
    116

    Re: Ending app

    If your main window hasnt been created, you must still be somewhere within the InitInstace of the application class. If this is the case, try passing information back to the app class and get the InitInstance to return false.
    (To find out where in the InitInstance your processing is being done, but a breakpoint in the code in the doc class, and step over code in the InitInstance till you hit your breakpoint).


  4. #4
    Join Date
    May 1999
    Posts
    3

    Re: Ending app

    Hello Brian,

    Thanks for answering, it solved my problem.

    Stijn


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