clientdemo.cpp 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. // clientdemo.cpp : Defines the class behaviors for the application.
  2. //
  3. #include "stdafx.h"
  4. #include "clientdemo.h"
  5. #include "clientdemoDlg.h"
  6. //#include "coinclient.h"
  7. #ifdef _DEBUG
  8. #define new DEBUG_NEW
  9. #undef THIS_FILE
  10. static char THIS_FILE[] = __FILE__;
  11. #endif
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CClientdemoApp
  14. BEGIN_MESSAGE_MAP(CClientdemoApp, CWinApp)
  15. //{{AFX_MSG_MAP(CClientdemoApp)
  16. // NOTE - the ClassWizard will add and remove mapping macros here.
  17. // DO NOT EDIT what you see in these blocks of generated code!
  18. //}}AFX_MSG
  19. ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  20. END_MESSAGE_MAP()
  21. /////////////////////////////////////////////////////////////////////////////
  22. // CClientdemoApp construction
  23. CClientdemoApp::CClientdemoApp()
  24. {
  25. // TODO: add construction code here,
  26. // Place all significant initialization in InitInstance
  27. }
  28. /////////////////////////////////////////////////////////////////////////////
  29. // The one and only CClientdemoApp object
  30. CClientdemoApp theApp;
  31. /////////////////////////////////////////////////////////////////////////////
  32. // CClientdemoApp initialization
  33. BOOL CClientdemoApp::InitInstance()
  34. {
  35. int isupport;
  36. AfxEnableControlContainer();
  37. // Standard initialization
  38. // If you are not using these features and wish to reduce the size
  39. // of your final executable, you should remove from the following
  40. // the specific initialization routines you do not need.
  41. isupport = MP4_ClientIsSupport();
  42. if (!(isupport & SUPPORT_DDRAW))
  43. {
  44. AfxMessageBox("not support DIRECTDRAW");
  45. return FALSE;
  46. }
  47. if (!(isupport & SUPPORT_BLT))
  48. {
  49. AfxMessageBox("not support BLT");
  50. return FALSE;
  51. }
  52. if (!(isupport & SUPPORT_CPU))
  53. {
  54. AfxMessageBox("not support CPU");
  55. return FALSE;
  56. }
  57. if (!(isupport & SUPPORT_BLTFOURCC))
  58. {
  59. AfxMessageBox("not support ");
  60. }
  61. if (!(isupport & SUPPORT_BLTSHRINKX))
  62. {
  63. AfxMessageBox("not support ");
  64. }
  65. if (!(isupport & SUPPORT_BLTSHRINKY))
  66. {
  67. AfxMessageBox("not support ");
  68. }
  69. if (!(isupport & SUPPORT_BLTSTRETCHX))
  70. {
  71. AfxMessageBox("not support ");
  72. }
  73. if (!(isupport & SUPPORT_BLTSTRETCHY))
  74. {
  75. AfxMessageBox("not support ");
  76. }
  77. #ifdef _AFXDLL
  78. Enable3dControls(); // Call this when using MFC in a shared DLL
  79. #else
  80. Enable3dControlsStatic(); // Call this when linking to MFC statically
  81. #endif
  82. CClientdemoDlg dlg;
  83. m_pMainWnd = &dlg;
  84. int nResponse = dlg.DoModal();
  85. if (nResponse == IDOK)
  86. {
  87. // TODO: Place code here to handle when the dialog is
  88. // dismissed with OK
  89. }
  90. else if (nResponse == IDCANCEL)
  91. {
  92. // TODO: Place code here to handle when the dialog is
  93. // dismissed with Cancel
  94. }
  95. // Since the dialog has been closed, return FALSE so that we exit the
  96. // application, rather than start the application's message pump.
  97. return FALSE;
  98. }