Re: Terminating Application

Tech-Archive recommends: Fix windows errors by optimizing your registry



Call ::PostQuitMessage(). Make sure that any threads know about it as well
so they can exit (I.E., not in tight loops).

Tom

"Mehran Ziadloo" <mehran20@xxxxxxxxxxx> wrote in message
news:uwgCvWlnFHA.3568@xxxxxxxxxxxxxxxxxxxxxxx
> 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
    ... >> 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)
  • Terminating Application
    ... Does anyone know how can I terminate an SDI application? ... I'm trying to make an error handling mechanism and ... for some critical situations I have to terminate the whole application since ... destructing tasks. ...
    (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)