home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / database / extbind / extbind.cpp < prev    next >
C/C++ Source or Header  |  1998-03-26  |  2KB  |  81 lines

  1. // extbind.cpp : Defines the class behaviors for the application.
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13.  
  14. #include "stdafx.h"
  15. #include "extbind.h"
  16. #include "nwinddlg.h"
  17. #include "modeldlg.h"
  18.  
  19. #ifdef _DEBUG
  20. #define new DEBUG_NEW
  21. #undef THIS_FILE
  22. static char BASED_CODE THIS_FILE[] = __FILE__;
  23. #endif
  24.  
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CEmployeeApp
  27.  
  28. BEGIN_MESSAGE_MAP(CEmployeeApp, CWinApp)
  29.     //{{AFX_MSG_MAP(CEmployeeApp)
  30.         // NOTE - the ClassWizard will add and remove mapping macros here.
  31.         //    DO NOT EDIT what you see in these blocks of generated code!
  32.     //}}AFX_MSG
  33.     ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  34. END_MESSAGE_MAP()
  35.  
  36. /////////////////////////////////////////////////////////////////////////////
  37. // CEmployeeApp construction
  38.  
  39. CEmployeeApp::CEmployeeApp()
  40. {
  41.     // TODO: add construction code here,
  42.     // Place all significant initialization in InitInstance
  43. }
  44.  
  45. /////////////////////////////////////////////////////////////////////////////
  46. // The one and only CEmployeeApp object
  47.  
  48. CEmployeeApp theApp;
  49.  
  50. /////////////////////////////////////////////////////////////////////////////
  51. // CEmployeeApp initialization
  52.  
  53. BOOL CEmployeeApp::InitInstance()
  54. {
  55.     // Standard initialization
  56.     // If you are not using these features and wish to reduce the size
  57.     //  of your final executable, you should remove from the following
  58.     //  the specific initialization routines you do not need.
  59.     AfxEnableControlContainer();
  60.     Enable3dControls();
  61.     LoadStdProfileSettings();  // Load standard INI file options (including MRU)
  62.  
  63.     CMainDlg dlg;
  64.     m_pMainWnd = &dlg;
  65.     int nResponse = dlg.DoModal();
  66.     if (nResponse == IDOK)
  67.     {
  68.         // TODO: Place code here to handle when the dialog is
  69.         // dismissed with OK
  70.     }
  71.     else if (nResponse == IDCANCEL)
  72.     {
  73.         // TODO: Place code here to handle when the dialog is
  74.         // dismissed with Cancel
  75.     }
  76.  
  77.     // Since the dialog has been closed, return FALSE so that we exit the
  78.     // application, rather than start the application's message pump.
  79.     return FALSE;
  80. }
  81.