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.

83 lines
2.1 KiB

  1. // PageGeneral.h : Declaration of the CPageGeneral
  2. #ifndef __PAGEGENERAL_H_
  3. #define __PAGEGENERAL_H_
  4. #pragma once
  5. #include "resource.h" // main symbols
  6. #include <atlhost.h>
  7. #include "msconfigstate.h"
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CPageGeneral
  10. class CPageGeneral :
  11. public CAxDialogImpl<CPageGeneral>
  12. {
  13. public:
  14. CPageGeneral()
  15. {
  16. }
  17. ~CPageGeneral()
  18. {
  19. }
  20. enum { IDD = IDD_PAGEGENERAL };
  21. BEGIN_MSG_MAP(CPageGeneral)
  22. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  23. COMMAND_ID_HANDLER(IDOK, OnOK)
  24. COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
  25. END_MSG_MAP()
  26. // Handler prototypes:
  27. // LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  28. // LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  29. // LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  30. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
  31. {
  32. ::EnableWindow(GetDlgItem(IDC_NORMALSTARTUP), FALSE);
  33. ::EnableWindow(GetDlgItem(IDC_DIAGNOSTICSTARTUP), FALSE);
  34. ::EnableWindow(GetDlgItem(IDC_SELECTIVESTARTUP), FALSE);
  35. ::EnableWindow(GetDlgItem(IDC_CHECK_PROCSYSINI), FALSE);
  36. ::EnableWindow(GetDlgItem(IDC_CHECKPROCWININI), FALSE);
  37. ::EnableWindow(GetDlgItem(IDC_CHECKLOADSYSSERVICES), FALSE);
  38. ::EnableWindow(GetDlgItem(IDC_CHECKLOADSTARTUPITEMS), FALSE);
  39. ::EnableWindow(GetDlgItem(IDC_BUTTONADVANCED), FALSE);
  40. ::EnableWindow(GetDlgItem(IDC_BUTTONEXTRACT), FALSE);
  41. ::EnableWindow(GetDlgItem(IDC_BUTTONMSCONFIGUNDO), FALSE);
  42. ::EnableWindow(GetDlgItem(IDC_BUTTONLAUNCHSYSRESTORE), FALSE);
  43. return 0;
  44. }
  45. LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
  46. {
  47. EndDialog(wID);
  48. return 0;
  49. }
  50. LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
  51. {
  52. EndDialog(wID);
  53. return 0;
  54. }
  55. BOOL IsValid(CMSConfigState * state)
  56. {
  57. return TRUE;
  58. }
  59. CString m_strCaption;
  60. LPCTSTR GetCaption()
  61. {
  62. if (m_strCaption.IsEmpty())
  63. {
  64. ::AfxSetResourceHandle(_Module.GetResourceInstance());
  65. m_strCaption.LoadString(IDS_GENERAL_CAPTION);
  66. }
  67. return m_strCaption;
  68. }
  69. };
  70. #endif //__PAGEGENERAL_H_