home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / DirectShow / Misc / Mapper / Mapper.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-09  |  2.5 KB  |  82 lines

  1. //------------------------------------------------------------------------------
  2. // File: Mapper.cpp
  3. //
  4. // Desc: DirectShow sample code - an MFC based C++ filter mapper application.
  5. //
  6. // Copyright (c) 2000-2001 Microsoft Corporation.  All rights reserved.
  7. //------------------------------------------------------------------------------
  8.  
  9. #include "stdafx.h"
  10. #include "Mapper.h"
  11. #include "MapperDlg.h"
  12.  
  13. #ifdef _DEBUG
  14. #define new DEBUG_NEW
  15. #undef THIS_FILE
  16. static char THIS_FILE[] = __FILE__;
  17. #endif
  18.  
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CMapperApp
  21.  
  22. BEGIN_MESSAGE_MAP(CMapperApp, CWinApp)
  23.     //{{AFX_MSG_MAP(CMapperApp)
  24.         // NOTE - the ClassWizard will add and remove mapping macros here.
  25.         //    DO NOT EDIT what you see in these blocks of generated code!
  26.     //}}AFX_MSG
  27.     ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  28. END_MESSAGE_MAP()
  29.  
  30. /////////////////////////////////////////////////////////////////////////////
  31. // CMapperApp construction
  32.  
  33. CMapperApp::CMapperApp()
  34. {
  35.     // TODO: add construction code here,
  36.     // Place all significant initialization in InitInstance
  37. }
  38.  
  39. /////////////////////////////////////////////////////////////////////////////
  40. // The one and only CMapperApp object
  41.  
  42. CMapperApp theApp;
  43.  
  44. /////////////////////////////////////////////////////////////////////////////
  45. // CMapperApp initialization
  46.  
  47. BOOL CMapperApp::InitInstance()
  48. {
  49.     // Standard initialization
  50.     // If you are not using these features and wish to reduce the size
  51.     //  of your final executable, you should remove from the following
  52.     //  the specific initialization routines you do not need.
  53.  
  54. #ifdef _AFXDLL
  55.     // In MFC 5.0, Enable3dControls and Enable3dControlsStatic are obsolete because
  56.     // their functionality is incorporated into Microsoft's 32-bit operating systems.
  57. #if (_MSC_VER <= 1200)
  58.     Enable3dControls();            // Call this when using MFC in a shared DLL
  59. #endif
  60. #else
  61.     Enable3dControlsStatic();    // Call this when linking to MFC statically
  62. #endif
  63.  
  64.     CMapperDlg dlg;
  65.     m_pMainWnd = &dlg;
  66.     int nResponse = (int) dlg.DoModal();
  67.     if (nResponse == IDOK)
  68.     {
  69.         // TODO: Place code here to handle when the dialog is
  70.         //  dismissed with OK
  71.     }
  72.     else if (nResponse == IDCANCEL)
  73.     {
  74.         // TODO: Place code here to handle when the dialog is
  75.         //  dismissed with Cancel
  76.     }
  77.  
  78.     // Since the dialog has been closed, return FALSE so that we exit the
  79.     //  application, rather than start the application's message pump.
  80.     return FALSE;
  81. }
  82.