return a value when an MFC dialog-based app exits 
Author Message
 return a value when an MFC dialog-based app exits

Can I override CWinApp::ExitInstance?

By default it shows this->

int CFcApp::ExitInstance()
{
 // TODO: Add your specialized code here and/or call the base class

 return CWinApp::ExitInstance();

Quote:
}

can I replace -> return CWinApp::ExitInstance();
with -> return myvalue;

Thanks in advance
Nish



Wed, 25 Feb 2004 18:40:42 GMT  
 return a value when an MFC dialog-based app exits
Hi!

Quote:

> Can I override CWinApp::ExitInstance?

> By default it shows this->

> int CFcApp::ExitInstance()
> {
>  // TODO: Add your specialized code here and/or call the base class

>  return CWinApp::ExitInstance();
> }

> can I replace -> return CWinApp::ExitInstance();
> with -> return myvalue;

If you do it like that, you'll lose the cleanup that CWinApp::ExitInstance performs, but you can do
it something like this...

int CFcApp::ExitInstance()
{
 CWinApp::ExitInstance();
 return myvalue;

Quote:
}

HTH,

Jeff...
--
Please post all follow-ups to the newsgroup only.



Wed, 25 Feb 2004 22:02:15 GMT  
 return a value when an MFC dialog-based app exits
Thanks :-)

Nish


Quote:
> Hi!




Quote:
> > Can I override CWinApp::ExitInstance?

> > By default it shows this->

> > int CFcApp::ExitInstance()
> > {
> >  // TODO: Add your specialized code here and/or call the base class

> >  return CWinApp::ExitInstance();
> > }

> > can I replace -> return CWinApp::ExitInstance();
> > with -> return myvalue;

> If you do it like that, you'll lose the cleanup that CWinApp::ExitInstance

performs, but you can do
Quote:
> it something like this...

> int CFcApp::ExitInstance()
> {
>  CWinApp::ExitInstance();
>  return myvalue;
> }

> HTH,

> Jeff...
> --
> Please post all follow-ups to the newsgroup only.



Thu, 26 Feb 2004 14:29:47 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Enter or Escape keys exit dialog-based app

2. How to exit from a dialog-based app?

3. exit from a dialog-based app

4. MFC dialog based application exit code

5. PBM: Message box not displayed after main dialog box is closed in MFC dialog-based app

6. ? Return values from a Dialog App

7. Exiting MFC Dialog DLL App

8. MFC Dialog-based applications return code

9. cannot instantiate an activex control in mfc dialog based app

10. Problem using delete with dialog-based MFC app

11. Tell me where 2 find good transparency tutorial (mfc - dialog based apps)

12. hiding an mfc dialog based app

 

 
Powered by phpBB® Forum Software