iconic21log.cpp 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. // webserver.cpp : Defines the class behaviors for the application.
  2. //
  3. #include "pch.h"
  4. #include "framework.h"
  5. #include "iconic21log.h"
  6. #include "iconic21logDlg.h"
  7. #ifdef _DEBUG
  8. #define new DEBUG_NEW
  9. #endif
  10. // CwebserverApp
  11. BEGIN_MESSAGE_MAP(Ciconic21logApp, CWinApp)
  12. ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
  13. END_MESSAGE_MAP()
  14. // CwebserverApp construction
  15. Ciconic21logApp::Ciconic21logApp()
  16. {
  17. // support Restart Manager
  18. m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;
  19. // TODO: add construction code here,
  20. // Place all significant initialization in InitInstance
  21. }
  22. // The one and only CwebserverApp object
  23. Ciconic21logApp theApp;
  24. // CwebserverApp initialization
  25. BOOL Ciconic21logApp::InitInstance()
  26. {
  27. // InitCommonControlsEx() is required on Windows XP if an application
  28. // manifest specifies use of ComCtl32.dll version 6 or later to enable
  29. // visual styles. Otherwise, any window creation will fail.
  30. INITCOMMONCONTROLSEX InitCtrls;
  31. InitCtrls.dwSize = sizeof(InitCtrls);
  32. // Set this to include all the common control classes you want to use
  33. // in your application.
  34. InitCtrls.dwICC = ICC_WIN95_CLASSES;
  35. InitCommonControlsEx(&InitCtrls);
  36. CWinApp::InitInstance();
  37. AfxEnableControlContainer();
  38. // Create the shell manager, in case the dialog contains
  39. // any shell tree view or shell list view controls.
  40. CShellManager *pShellManager = new CShellManager;
  41. // Activate "Windows Native" visual manager for enabling themes in MFC controls
  42. CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));
  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. // Change the registry key under which our settings are stored
  48. // TODO: You should modify this string to be something appropriate
  49. // such as the name of your company or organization
  50. SetRegistryKey(_T("Local AppWizard-Generated Applications"));
  51. Ciconic21ogDlg dlg;
  52. m_pMainWnd = &dlg;
  53. INT_PTR nResponse = dlg.DoModal();
  54. if (nResponse == IDOK)
  55. {
  56. // TODO: Place code here to handle when the dialog is
  57. // dismissed with OK
  58. }
  59. else if (nResponse == IDCANCEL)
  60. {
  61. // TODO: Place code here to handle when the dialog is
  62. // dismissed with Cancel
  63. }
  64. else if (nResponse == -1)
  65. {
  66. TRACE(traceAppMsg, 0, "Warning: dialog creation failed, so application is terminating unexpectedly.\n");
  67. TRACE(traceAppMsg, 0, "Warning: if you are using MFC controls on the dialog, you cannot #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS.\n");
  68. }
  69. // Delete the shell manager created above.
  70. if (pShellManager != nullptr)
  71. {
  72. delete pShellManager;
  73. }
  74. #if !defined(_AFXDLL) && !defined(_AFX_NO_MFC_CONTROLS_IN_DIALOGS)
  75. ControlBarCleanUp();
  76. #endif
  77. // Since the dialog has been closed, return FALSE so that we exit the
  78. // application, rather than start the application's message pump.
  79. return FALSE;
  80. }