Click here to Skip to main content
16,011,436 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: IMPLEMENT_DYNCREATE Pin
Roger Allen16-May-04 22:49
Roger Allen16-May-04 22:49 
GeneralRe: IMPLEMENT_DYNCREATE Pin
alex.barylski17-May-04 13:19
alex.barylski17-May-04 13:19 
GeneralMacro explaination Pin
ShankarPS16-May-04 18:24
ShankarPS16-May-04 18:24 
GeneralRe: Macro explaination Pin
Ryan Binns16-May-04 18:42
Ryan Binns16-May-04 18:42 
GeneralRe: Macro explaination Pin
ShankarPS16-May-04 19:02
ShankarPS16-May-04 19:02 
GeneralRe: Macro explaination Pin
Ryan Binns16-May-04 19:34
Ryan Binns16-May-04 19:34 
GeneralASSERT message Pin
alex.barylski16-May-04 17:56
alex.barylski16-May-04 17:56 
QuestionHow do you close an MFC Dialog application programatically? Pin
Steve Messer16-May-04 17:49
Steve Messer16-May-04 17:49 
I am trying to add some error handling to my project and I want to exit if either the configuration file from the command line doesn't exist or the configuration file has parsing errors. I have tried the code below using Visual Studio 2003 (MFC Dialog based application). The application does not exit. What is the correct way to force a shutdown of my MFC Dialog based application?
<code>
if( InitDOM( XMLFileName ))
{
    if( !ParseDOM() )
    {
	CString msg;
	msg.Format("Invalid node fetched.\n%s\n", (LPCSTR)pXMLDom->parseError->Getreason());
	AfxMessageBox( msg );
	PostQuitMessage(0);
    }
    else
    {
       ProcessPanels();
    }
}
else
{
   // config file did not exist
   AfxMessageBox( " config file did not exist" );
   PostQuitMessage(0);
} 
</code>

AnswerRe: How do you close an MFC Dialog application programatically? Pin
Joe Woodbury16-May-04 19:00
professionalJoe Woodbury16-May-04 19:00 
GeneralRe: How do you close an MFC Dialog application programatically? Pin
Steve Messer16-May-04 21:14
Steve Messer16-May-04 21:14 
GeneralRe: How do you close an MFC Dialog application programatically? Pin
David Crow17-May-04 2:48
David Crow17-May-04 2:48 
GeneralRe: How do you close an MFC Dialog application programatically? Pin
Steve Messer17-May-04 4:13
Steve Messer17-May-04 4:13 
GeneralRe: How do you close an MFC Dialog application programatically? Pin
David Crow17-May-04 4:29
David Crow17-May-04 4:29 
GeneralRe: How do you close an MFC Dialog application programatically? Pin
Steve Messer17-May-04 4:40
Steve Messer17-May-04 4:40 
GeneralRe: How do you close an MFC Dialog application programatically? Pin
Steve Messer17-May-04 4:15
Steve Messer17-May-04 4:15 
GeneralRe: How do you close an MFC Dialog application programatically? Pin
David Crow17-May-04 4:30
David Crow17-May-04 4:30 
AnswerRe: How do you close an MFC Dialog application programatically? Pin
toxcct16-May-04 22:10
toxcct16-May-04 22:10 
GeneralLooking for source code of Web search engine. Pin
George216-May-04 16:40
George216-May-04 16:40 
GeneralRe: Looking for source code of Web search engine. Pin
ShankarPS16-May-04 18:42
ShankarPS16-May-04 18:42 
GeneralRe: Looking for source code of Web search engine. Pin
George217-May-04 0:41
George217-May-04 0:41 
GeneralRe: Looking for source code of Web search engine. Pin
alex.barylski16-May-04 18:58
alex.barylski16-May-04 18:58 
GeneralRe: Looking for source code of Web search engine. Pin
George217-May-04 0:45
George217-May-04 0:45 
GeneralDefault Project Settings Pin
Jack Puppy16-May-04 16:13
Jack Puppy16-May-04 16:13 
GeneralRe: Default Project Settings Pin
Jack Puppy16-May-04 16:55
Jack Puppy16-May-04 16:55 
GeneralC++ Code for ISBN validation Pin
James K16-May-04 15:34
James K16-May-04 15:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.