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

  1. // DAOTable.cpp : Defines the class behaviors for the application.
  2. //
  3. // Main application file -- contains MFC initialization code
  4. //
  5. // This is a part of the Microsoft Foundation Classes C++ library.
  6. // Copyright (C) 1992-1998 Microsoft Corporation
  7. // All rights reserved.
  8. //
  9. // This source code is only intended as a supplement to the
  10. // Microsoft Foundation Classes Reference and related
  11. // electronic documentation provided with the library.
  12. // See these sources for detailed information regarding the
  13. // Microsoft Foundation Classes product.
  14.  
  15. #include "stdafx.h"
  16. #include "DAOTable.h"
  17. #include "DAOTDlg.h"
  18.  
  19. #ifdef _DEBUG
  20. #define new DEBUG_NEW
  21. #undef THIS_FILE
  22. static char THIS_FILE[] = __FILE__;
  23. #endif
  24.  
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CDAOTableApp
  27.  
  28. BEGIN_MESSAGE_MAP(CDAOTableApp, CWinApp)
  29.     //{{AFX_MSG_MAP(CDAOTableApp)
  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. // CDAOTableApp construction
  38.  
  39. CDAOTableApp::CDAOTableApp()
  40. {
  41.     // TODO: add construction code here,
  42.     // Place all significant initialization in InitInstance
  43. }
  44.  
  45. /////////////////////////////////////////////////////////////////////////////
  46. // The one and only CDAOTableApp object
  47.  
  48. CDAOTableApp theApp;
  49.  
  50. /////////////////////////////////////////////////////////////////////////////
  51. // CDAOTableApp initialization
  52.  
  53. BOOL CDAOTableApp::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.  
  60. #ifdef _AFXDLL
  61.     Enable3dControls();         // Call this when using MFC in a shared DLL
  62. #else
  63.     Enable3dControlsStatic();   // Call this when linking to MFC statically
  64. #endif
  65.  
  66.     CDAOTableDlg dlg;
  67.     m_pMainWnd = &dlg;
  68.     int nResponse = dlg.DoModal();
  69.     if (nResponse == IDOK)
  70.     {
  71.         // TODO: Place code here to handle when the dialog is
  72.         //  dismissed with OK
  73.     }
  74.     else if (nResponse == IDCANCEL)
  75.     {
  76.         // TODO: Place code here to handle when the dialog is
  77.         //  dismissed with Cancel
  78.     }
  79.  
  80.     // Since the dialog has been closed, return FALSE so that we exit the
  81.     //  application, rather than start the application's message pump.
  82.     return FALSE;
  83. }
  84.