Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
CWinApp::ExitInstance
Collapse the table of content
Expand the table of content

CWinApp::ExitInstance

Called by the framework from within the Run member function to exit this instance of the application.

virtual int ExitInstance( );

The application's exit code; 0 indicates no errors, and values greater than 0 indicate an error. This value is used as the return value from WinMain.

Do not call this member function from anywhere but within the Run member function.

The default implementation of this function writes framework options to the application's .INI file. Override this function to clean up when your application terminates.

int CMyApp::ExitInstance()
{
  if (m_pMySampleMem)
     delete m_pMySampleMem;

   DoCleanup();

   return CWinApp::ExitInstance();
}

Header: afxwin.h

Show:
© 2015 Microsoft