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

  1. // dlgtemp.cpp : Defines the class behaviors for the application.
  2. //
  3.  
  4. // This is a part of the Microsoft Foundation Classes C++ library.
  5. // Copyright (C) 1992-1998 Microsoft Corporation
  6. // All rights reserved.
  7. //
  8. // This source code is only intended as a supplement to the
  9. // Microsoft Foundation Classes Reference and related
  10. // electronic documentation provided with the library.
  11. // See these sources for detailed information regarding the
  12. // Microsoft Foundation Classes product.
  13.  
  14. #include "stdafx.h"
  15. #include "dlgtemp.h"
  16. #include "setupdlg.h"
  17.  
  18. #ifdef _DEBUG
  19. #define new DEBUG_NEW
  20. #undef THIS_FILE
  21. static char THIS_FILE[] = __FILE__;
  22. #endif
  23.  
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CDlgtempApp
  26.  
  27. BEGIN_MESSAGE_MAP(CDlgtempApp, CWinApp)
  28.     //{{AFX_MSG_MAP(CDlgtempApp)
  29.         // NOTE - the ClassWizard will add and remove mapping macros here.
  30.         //    DO NOT EDIT what you see in these blocks of generated code!
  31.     //}}AFX_MSG
  32.     ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  33. END_MESSAGE_MAP()
  34.  
  35. /////////////////////////////////////////////////////////////////////////////
  36. // CDlgtempApp construction
  37.  
  38. CDlgtempApp::CDlgtempApp()
  39. {
  40.     // TODO: add construction code here,
  41.     // Place all significant initialization in InitInstance
  42. }
  43.  
  44. /////////////////////////////////////////////////////////////////////////////
  45. // The one and only CDlgtempApp object
  46.  
  47. CDlgtempApp theApp;
  48.  
  49. /////////////////////////////////////////////////////////////////////////////
  50. // CDlgtempApp initialization
  51.  
  52. BOOL CDlgtempApp::InitInstance()
  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.     CDlgtempDlg dlg;
  66.     m_pMainWnd = &dlg;
  67.     int nResponse = dlg.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.