VcDemo.cpp 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // VcDemo.cpp : Defines the class behaviors for the application.
  2. //
  3. #include "stdafx.h"
  4. #include "VcDemo.h"
  5. #include "VcDemoDlg.h"
  6. #include <initguid.h>
  7. #ifdef _DEBUG
  8. #define new DEBUG_NEW
  9. #undef THIS_FILE
  10. static char THIS_FILE[] = __FILE__;
  11. #endif
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CVcDemoApp
  14. BEGIN_MESSAGE_MAP(CVcDemoApp, CWinApp)
  15. //{{AFX_MSG_MAP(CVcDemoApp)
  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. // CVcDemoApp construction
  23. CVcDemoApp::CVcDemoApp()
  24. {
  25. // TODO: add construction code here,
  26. // Place all significant initialization in InitInstance
  27. }
  28. /////////////////////////////////////////////////////////////////////////////
  29. // The one and only CVcDemoApp object
  30. CVcDemoApp theApp;
  31. /////////////////////////////////////////////////////////////////////////////
  32. // CVcDemoApp initialization
  33. BOOL CVcDemoApp::InitInstance()
  34. {
  35. // if (!InitATL())
  36. // return FALSE;
  37. CCommandLineInfo cmdInfo;
  38. ParseCommandLine(cmdInfo);
  39. if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated)
  40. {
  41. return TRUE;
  42. }
  43. // Standard initialization
  44. // If you are not using these features and wish to reduce the size
  45. // of your final executable, you should remove from the following
  46. // the specific initialization routines you do not need.
  47. CVcDemoDlg dlg;
  48. m_pMainWnd = &dlg;
  49. int nResponse = dlg.DoModal();
  50. if (nResponse == IDOK)
  51. {
  52. // TODO: Place code here to handle when the dialog is
  53. // dismissed with OK
  54. }
  55. else if (nResponse == IDCANCEL)
  56. {
  57. // TODO: Place code here to handle when the dialog is
  58. // dismissed with Cancel
  59. }
  60. // Since the dialog has been closed, return FALSE so that we exit the
  61. // application, rather than start the application's message pump.
  62. return FALSE;
  63. }
  64. int CVcDemoApp::ExitInstance()
  65. {
  66. return CWinApp::ExitInstance();
  67. }