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.

137 lines
3.2 KiB

  1. // ISAdmin.cpp : Defines the class behaviors for the application.
  2. //
  3. #include "stdafx.h"
  4. #include "ISAdmin.h"
  5. #include "mainfrm.h"
  6. #include "ISAdmdoc.h"
  7. #include "ISAdmvw.h"
  8. #include "formvw1.h"
  9. #ifdef _DEBUG
  10. #undef THIS_FILE
  11. static char BASED_CODE THIS_FILE[] = __FILE__;
  12. #endif
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CISAdminApp
  15. BEGIN_MESSAGE_MAP(CISAdminApp, CWinApp)
  16. //{{AFX_MSG_MAP(CISAdminApp)
  17. ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
  18. // NOTE - the ClassWizard will add and remove mapping macros here.
  19. // DO NOT EDIT what you see in these blocks of generated code!
  20. //}}AFX_MSG_MAP
  21. // Standard file based document commands
  22. ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
  23. ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
  24. // Standard print setup command
  25. ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
  26. END_MESSAGE_MAP()
  27. /////////////////////////////////////////////////////////////////////////////
  28. // CISAdminApp construction
  29. CISAdminApp::CISAdminApp()
  30. {
  31. // TODO: add construction code here,
  32. // Place all significant initialization in InitInstance
  33. }
  34. /////////////////////////////////////////////////////////////////////////////
  35. // The one and only CISAdminApp object
  36. CISAdminApp theApp;
  37. /////////////////////////////////////////////////////////////////////////////
  38. // CISAdminApp initialization
  39. BOOL CISAdminApp::InitInstance()
  40. {
  41. // Standard initialization
  42. // If you are not using these features and wish to reduce the size
  43. // of your final executable, you should remove from the following
  44. // the specific initialization routines you do not need.
  45. Enable3dControls();
  46. LoadStdProfileSettings(); // Load standard INI file options (including MRU)
  47. // Register the application's document templates. Document templates
  48. // serve as the connection between documents, frame windows and views.
  49. CSingleDocTemplate* pDocTemplate;
  50. pDocTemplate = new CSingleDocTemplate(
  51. IDR_MAINFRAME,
  52. RUNTIME_CLASS(CISAdminDoc),
  53. RUNTIME_CLASS(CMainFrame), // main SDI frame window
  54. // RUNTIME_CLASS(CISAdminView));
  55. RUNTIME_CLASS(CFormVw1));
  56. AddDocTemplate(pDocTemplate);
  57. // create a new (empty) document
  58. OnFileNew();
  59. if (m_lpCmdLine[0] != '\0')
  60. {
  61. // TODO: add command line processing here
  62. }
  63. return TRUE;
  64. }
  65. /////////////////////////////////////////////////////////////////////////////
  66. // CAboutDlg dialog used for App About
  67. class CAboutDlg : public CDialog
  68. {
  69. public:
  70. CAboutDlg();
  71. // Dialog Data
  72. //{{AFX_DATA(CAboutDlg)
  73. enum { IDD = IDD_ABOUTBOX };
  74. //}}AFX_DATA
  75. // Implementation
  76. protected:
  77. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  78. //{{AFX_MSG(CAboutDlg)
  79. // No message handlers
  80. //}}AFX_MSG
  81. DECLARE_MESSAGE_MAP()
  82. };
  83. CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
  84. {
  85. //{{AFX_DATA_INIT(CAboutDlg)
  86. //}}AFX_DATA_INIT
  87. }
  88. void CAboutDlg::DoDataExchange(CDataExchange* pDX)
  89. {
  90. CDialog::DoDataExchange(pDX);
  91. //{{AFX_DATA_MAP(CAboutDlg)
  92. //}}AFX_DATA_MAP
  93. }
  94. BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
  95. //{{AFX_MSG_MAP(CAboutDlg)
  96. // No message handlers
  97. //}}AFX_MSG_MAP
  98. END_MESSAGE_MAP()
  99. // App command to run the dialog
  100. void CISAdminApp::OnAppAbout()
  101. {
  102. CAboutDlg aboutDlg;
  103. aboutDlg.DoModal();
  104. }
  105. /////////////////////////////////////////////////////////////////////////////
  106. // CISAdminApp commands