Re: Batch file and MFC (Properly Terminating Application)
- From: "one-trick-pony" <worldofpain.aamir@xxxxxxxxx>
- Date: 7 Feb 2007 06:34:32 -0800
void CDummy1Dlg::OnClose()
{
// TODO: Add your control notification handler code here
running = FALSE;
WaitForSingleObject(myWorkerThread->m_hThread,INFINITE);
delete myWorkerThread; <<PROGRAM CRASHES HERE
EndDialog(0); //
CDummy1Dlg::OnClose();
}
Thanks Scott- It works. Is this legal? Are we using brute force to
shut it down or would this be considered graceful shutdown? And also,
Joseph may not like magic number '0' in EndDialog. Is there an
alternative, ie, user defined IDEND datatype?
At this point in time, I would like to thank all of you guys who
helped me toward becoming better coder and gave me new prespectives.
I will continue to study. Like with any other skill, to sharpen it
one must practice over and over.
.
- Follow-Ups:
- Re: Batch file and MFC (Properly Terminating Application)
- From: Joseph M . Newcomer
- Re: Batch file and MFC (Properly Terminating Application)
- From: Scott McPhillips [MVP]
- Re: Batch file and MFC (Properly Terminating Application)
- From: one-trick-pony
- Re: Batch file and MFC (Properly Terminating Application)
- References:
- Re: Batch file and MFC (Properly Terminating Application)
- From: Joseph M . Newcomer
- Re: Batch file and MFC (Properly Terminating Application)
- From: Alexander Grigoriev
- Re: Batch file and MFC (Properly Terminating Application)
- From: Joseph M . Newcomer
- Re: Batch file and MFC (Properly Terminating Application)
- From: one-trick-pony
- Re: Batch file and MFC (Properly Terminating Application)
- From: Scott McPhillips [MVP]
- Re: Batch file and MFC (Properly Terminating Application)
- From: one-trick-pony
- Re: Batch file and MFC (Properly Terminating Application)
- From: Scott McPhillips [MVP]
- Re: Batch file and MFC (Properly Terminating Application)
- From: one-trick-pony
- Re: Batch file and MFC (Properly Terminating Application)
- From: Scott McPhillips [MVP]
- Re: Batch file and MFC (Properly Terminating Application)
- From: Joseph M . Newcomer
- Re: Batch file and MFC (Properly Terminating Application)
- From: one-trick-pony
- Re: Batch file and MFC (Properly Terminating Application)
- From: one-trick-pony
- Re: Batch file and MFC (Properly Terminating Application)
- From: Scott McPhillips [MVP]
- Re: Batch file and MFC (Properly Terminating Application)
- From: one-trick-pony
- Re: Batch file and MFC (Properly Terminating Application)
- From: Scott McPhillips [MVP]
- Re: Batch file and MFC (Properly Terminating Application)
- Prev by Date: Re: COleDateTime Issue
- Next by Date: Re: OT - Productivity level?
- Previous by thread: Re: Batch file and MFC (Properly Terminating Application)
- Next by thread: Re: Batch file and MFC (Properly Terminating Application)
- Index(es):
Relevant Pages
|
Loading