Terminating Application

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi,
Does anyone know how can I terminate an SDI application?
To explain my situation, I'm trying to make an error handling mechanism and
for some critical situations I have to terminate the whole application since
it can't carry on anymore. I want to do this somehow that my classes
destructors are called too. I have tried sending WM_CLOSE to the project's
main window but it can't work out since I don't want my code execution flow
to carry on after I sent this message (it makes unhandled exceptions). I
would like something like exit(0) but it won't let the classes to do their
destructing tasks.

Does anyone have any idea?!

Thanks,
Mehran Ziadloo


.



Relevant Pages

  • Re: Terminating Application
    ... Tom ... > Does anyone know how can I terminate an SDI application? ... > for some critical situations I have to terminate the whole application ... > destructing tasks. ...
    (microsoft.public.vc.mfc)
  • Re: Terminating Application
    ... >> Does anyone know how can I terminate an SDI application? ... >> for some critical situations I have to terminate the whole application ... >> destructing tasks. ... MVP Tips: http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)
  • Re: Terminating Application
    ... Otherwise your main window may already be closed on the way up the return ... > Does anyone know how can I terminate an SDI application? ... > for some critical situations I have to terminate the whole application ... > destructing tasks. ...
    (microsoft.public.vc.mfc)