FocusHighlight.cpp 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. // FocusHighlight.cpp : Defines the class behaviors for the application.
  2. //
  3. #include "stdafx.h"
  4. #include "FocusHighlight.h"
  5. #include "FocusHighlightDlg.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #endif
  9. // CFocusHighlightApp
  10. BEGIN_MESSAGE_MAP(CFocusHighlightApp, CWinApp)
  11. ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
  12. END_MESSAGE_MAP()
  13. // CFocusHighlightApp construction
  14. CFocusHighlightApp::CFocusHighlightApp()
  15. {
  16. // support Restart Manager
  17. m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;
  18. // TODO: add construction code here,
  19. // Place all significant initialization in InitInstance
  20. }
  21. // The one and only CFocusHighlightApp object
  22. CFocusHighlightApp theApp;
  23. // CFocusHighlightApp initialization
  24. BOOL CFocusHighlightApp::InitInstance()
  25. {
  26. // InitCommonControlsEx() is required on Windows XP if an application
  27. // manifest specifies use of ComCtl32.dll version 6 or later to enable
  28. // visual styles. Otherwise, any window creation will fail.
  29. INITCOMMONCONTROLSEX InitCtrls;
  30. InitCtrls.dwSize = sizeof(InitCtrls);
  31. // Set this to include all the common control classes you want to use
  32. // in your application.
  33. InitCtrls.dwICC = ICC_WIN95_CLASSES;
  34. InitCommonControlsEx(&InitCtrls);
  35. CWinApp::InitInstance();
  36. AfxEnableControlContainer();
  37. // Create the shell manager, in case the dialog contains
  38. // any shell tree view or shell list view controls.
  39. CShellManager *pShellManager = new CShellManager;
  40. // Standard initialization
  41. // If you are not using these features and wish to reduce the size
  42. // of your final executable, you should remove from the following
  43. // the specific initialization routines you do not need
  44. // Change the registry key under which our settings are stored
  45. // TODO: You should modify this string to be something appropriate
  46. // such as the name of your company or organization
  47. SetRegistryKey(_T("Local AppWizard-Generated Applications"));
  48. CFocusHighlightDlg dlg;
  49. m_pMainWnd = &dlg;
  50. INT_PTR nResponse = dlg.DoModal();
  51. if (nResponse == IDOK)
  52. {
  53. // TODO: Place code here to handle when the dialog is
  54. // dismissed with OK
  55. }
  56. else if (nResponse == IDCANCEL)
  57. {
  58. // TODO: Place code here to handle when the dialog is
  59. // dismissed with Cancel
  60. }
  61. // Delete the shell manager created above.
  62. if (pShellManager != NULL)
  63. {
  64. delete pShellManager;
  65. }
  66. // Since the dialog has been closed, return FALSE so that we exit the
  67. // application, rather than start the application's message pump.
  68. return FALSE;
  69. }