Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
2.6 KiB

  1. // clustest.cpp : Defines the class behaviors for the application.
  2. //
  3. #include "stdafx.h"
  4. #include "clustest.h"
  5. #include "clusDlg.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CClustestApp
  13. BEGIN_MESSAGE_MAP(CClustestApp, CWinApp)
  14. //{{AFX_MSG_MAP(CClustestApp)
  15. // NOTE - the ClassWizard will add and remove mapping macros here.
  16. // DO NOT EDIT what you see in these blocks of generated code!
  17. //}}AFX_MSG
  18. ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  19. END_MESSAGE_MAP()
  20. /////////////////////////////////////////////////////////////////////////////
  21. // CClustestApp construction
  22. CClustestApp::CClustestApp()
  23. {
  24. // TODO: add construction code here,
  25. // Place all significant initialization in InitInstance
  26. }
  27. /////////////////////////////////////////////////////////////////////////////
  28. // The one and only CClustestApp object
  29. CClustestApp theApp;
  30. /////////////////////////////////////////////////////////////////////////////
  31. // CClustestApp initialization
  32. BOOL CClustestApp::InitInstance()
  33. {
  34. // Initialize OLE libraries
  35. if (!AfxOleInit())
  36. {
  37. AfxMessageBox(IDP_OLE_INIT_FAILED);
  38. return FALSE;
  39. }
  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. #ifdef _AFXDLL
  45. Enable3dControls(); // Call this when using MFC in a shared DLL
  46. #else
  47. Enable3dControlsStatic(); // Call this when linking to MFC statically
  48. #endif
  49. // Parse the command line to see if launched as OLE server
  50. if (RunEmbedded() || RunAutomated())
  51. {
  52. // Register all OLE server (factories) as running. This enables the
  53. // OLE libraries to create objects from other applications.
  54. COleTemplateServer::RegisterAll();
  55. // Application was run with /Embedding or /Automation. Don't show the
  56. // main window in this case.
  57. return TRUE;
  58. }
  59. // When a server application is launched stand-alone, it is a good idea
  60. // to update the system registry in case it has been damaged.
  61. COleObjectFactory::UpdateRegistryAll();
  62. CClustestDlg dlg;
  63. m_pMainWnd = &dlg;
  64. int nResponse = dlg.DoModal();
  65. if (nResponse == IDOK)
  66. {
  67. // TODO: Place code here to handle when the dialog is
  68. // dismissed with OK
  69. }
  70. else if (nResponse == IDCANCEL)
  71. {
  72. // TODO: Place code here to handle when the dialog is
  73. // dismissed with Cancel
  74. }
  75. // Since the dialog has been closed, return FALSE so that we exit the
  76. // application, rather than start the application's message pump.
  77. return FALSE;
  78. }