Click to See Complete Forum and Search --> : Ending app


Stijn Steutel
May 4th, 1999, 04:51 AM
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

Joerg
May 4th, 1999, 09:09 AM
Try SendMessage(WM_QUIT)

BrianOG
May 4th, 1999, 10:53 AM
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).

Stijn Steutel
May 5th, 1999, 08:12 AM
Hello Brian,

Thanks for answering, it solved my problem.

Stijn