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

  1. // BindEnrl.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. #include "stdafx.h"
  14. #include "BindEnrl.h"
  15. #include "propsht.h"
  16.  
  17. #ifdef _DEBUG
  18. #define new DEBUG_NEW
  19. #undef THIS_FILE
  20. static char THIS_FILE[] = __FILE__;
  21. #endif
  22.  
  23. /////////////////////////////////////////////////////////////////////////////
  24. // CBindEnrlApp
  25.  
  26. BEGIN_MESSAGE_MAP(CBindEnrlApp, CWinApp)
  27.     //{{AFX_MSG_MAP(CBindEnrlApp)
  28.         // NOTE - the ClassWizard will add and remove mapping macros here.
  29.         //    DO NOT EDIT what you see in these blocks of generated code!
  30.     //}}AFX_MSG
  31. END_MESSAGE_MAP()
  32.  
  33. /////////////////////////////////////////////////////////////////////////////
  34. // CBindEnrlApp construction
  35.  
  36. CBindEnrlApp::CBindEnrlApp()
  37. {
  38.     // TODO: add construction code here,
  39.     // Place all significant initialization in InitInstance
  40. }
  41.  
  42. /////////////////////////////////////////////////////////////////////////////
  43. // The one and only CBindEnrlApp object
  44.  
  45. CBindEnrlApp theApp;
  46.  
  47. /////////////////////////////////////////////////////////////////////////////
  48. // CBindEnrlApp initialization
  49.  
  50. BOOL CBindEnrlApp::InitInstance()
  51. {
  52.     AfxEnableControlContainer();
  53.  
  54.     // Standard initialization
  55.     // If you are not using these features and wish to reduce the size
  56.     // of your final executable, you should remove from the following
  57.     // the specific initialization routines you do not need.
  58.  
  59. #ifdef _AFXDLL
  60.     Enable3dControls();         // Call this when using MFC in a shared DLL
  61. #else
  62.     Enable3dControlsStatic();   // Call this when linking to MFC statically
  63. #endif
  64.  
  65.     CEnrollSheet enroll_sheet(_T("BINDENRL - Databound Enroll"));
  66.     m_pMainWnd = &enroll_sheet;
  67.     int nResponse = enroll_sheet.DoModal();
  68.     if (nResponse == IDOK)
  69.     {
  70.         // TODO: Place code here to handle when the dialog is
  71.         // dismissed with OK
  72.     }
  73.     else if (nResponse == IDCANCEL)
  74.     {
  75.         // TODO: Place code here to handle when the dialog is
  76.         // dismissed with Cancel
  77.     }
  78.  
  79.     // Since the dialog has been closed, return FALSE so that we exit the
  80.     // application, rather than start the application's message pump.
  81.     return FALSE;
  82. }
  83.