home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / MFC_Samples / modeless / modeless.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  1.4 KB  |  54 lines

  1. // modeless.cpp : Defines the class behaviors for the application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "modeless.h"
  6. #include "adderdlg.h"
  7. #include "modeldlg.h"
  8.  
  9. #ifdef _DEBUG
  10. #undef THIS_FILE
  11. static char BASED_CODE THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CModelessApp
  16.  
  17. BEGIN_MESSAGE_MAP(CModelessApp, CWinApp)
  18.     //{{AFX_MSG_MAP(CModelessApp)
  19.         // NOTE - the ClassWizard will add and remove mapping macros here.
  20.         //    DO NOT EDIT what you see in these blocks of generated code!
  21.     //}}AFX_MSG
  22.     ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  23. END_MESSAGE_MAP()
  24.  
  25. /////////////////////////////////////////////////////////////////////////////
  26. // The one and only CModelessApp object
  27.  
  28. CModelessApp theApp;
  29.  
  30. /////////////////////////////////////////////////////////////////////////////
  31. // CModelessApp initialization
  32.  
  33. BOOL CModelessApp::InitInstance()
  34. {
  35.     // Standard initialization
  36.     // If you are not using these features and wish to reduce the size
  37.     //  of your final executable, you should remove from the following
  38.     //  the specific initialization routines you do not need.
  39.  
  40.     CMainDlg dlg;
  41.     m_pMainWnd = &dlg;
  42.     int nResponse = dlg.DoModal();
  43.     if (nResponse == IDOK)
  44.     {
  45.     }
  46.     else if (nResponse == IDCANCEL)
  47.     {
  48.     }
  49.  
  50.     // Since the dialog has been closed, return FALSE so that we exit the
  51.     //  application, rather than start the application's message pump.
  52.     return FALSE;
  53. }
  54.