home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / graphics / ba / usevideo / videomfc / vdmfc.cpp < prev    next >
C/C++ Source or Header  |  1997-08-29  |  2KB  |  83 lines

  1. // VdMFC.cpp : Defines the class behaviors for the application.
  2. //
  3. // Copyright (C) 1997 Microsoft Corporation
  4. // All rights reserved.
  5. //
  6. // This source code is only intended as a supplement to the
  7. // Broadcast Architecture Programmer's Reference.
  8. // For detailed information regarding Broadcast
  9. // Architecture, see the reference.
  10. //
  11.  
  12. #include "stdafx.h"
  13. #include "VdMFC.h"
  14. #include "VdMFCDlg.h"
  15.  
  16. #ifdef _DEBUG
  17. #define new DEBUG_NEW
  18. #undef THIS_FILE
  19. static char THIS_FILE[] = __FILE__;
  20. #endif
  21.  
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CVdMFCApp
  24.  
  25. BEGIN_MESSAGE_MAP(CVdMFCApp, CWinApp)
  26.     //{{AFX_MSG_MAP(CVdMFCApp)
  27.         // NOTE - the ClassWizard will add and remove mapping macros here.
  28.         //    DO NOT EDIT what you see in these blocks of generated code!
  29.     //}}AFX_MSG
  30.     ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  31. END_MESSAGE_MAP()
  32.  
  33. /////////////////////////////////////////////////////////////////////////////
  34. // CVdMFCApp construction
  35.  
  36. CVdMFCApp::CVdMFCApp()
  37. {
  38.     // TODO: add construction code here,
  39.     // Place all significant initialization in InitInstance
  40. }
  41.  
  42. /////////////////////////////////////////////////////////////////////////////
  43. // The one and only CVdMFCApp object
  44.  
  45. CVdMFCApp theApp;
  46.  
  47. /////////////////////////////////////////////////////////////////////////////
  48. // CVdMFCApp initialization
  49.  
  50. BOOL CVdMFCApp::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.     CVdMFCDlg 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.