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.

68 lines
1.7 KiB

  1. // PageIni.h : Declaration of the CPageIni
  2. #ifndef __PAGESERVICES_H_
  3. #define __PAGESERVICES_H_
  4. #include "resource.h" // main symbols
  5. #include <atlhost.h>
  6. #include "msconfigstate.h"
  7. /////////////////////////////////////////////////////////////////////////////
  8. // CPageIni
  9. class CPageServices :
  10. public CAxDialogImpl<CPageServices>
  11. {
  12. public:
  13. CPageServices()
  14. {
  15. }
  16. ~CPageServices()
  17. {
  18. }
  19. enum { IDD = IDD_PAGESERVICES };
  20. BEGIN_MSG_MAP(CPageIni)
  21. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  22. END_MSG_MAP()
  23. // Handler prototypes:
  24. // LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  25. // LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  26. // LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  27. private:
  28. CString m_strCaption; // contains the localized name of this page
  29. public:
  30. //-------------------------------------------------------------------------
  31. // Functions used by the parent dialog.
  32. //-------------------------------------------------------------------------
  33. BOOL IsValid(CMSConfigState * state)
  34. {
  35. return TRUE;
  36. }
  37. LPCTSTR GetCaption()
  38. {
  39. if (m_strCaption.IsEmpty())
  40. {
  41. ::AfxSetResourceHandle(_Module.GetResourceInstance());
  42. m_strCaption.LoadString(IDS_SERVICES_CAPTION);
  43. }
  44. return m_strCaption;
  45. }
  46. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
  47. {
  48. ::EnableWindow(GetDlgItem(IDC_BUTTONSERVENABLEALL), FALSE);
  49. ::EnableWindow(GetDlgItem(IDC_BUTTONSERVDISABLEALL), FALSE);
  50. ::EnableWindow(GetDlgItem(IDC_CHECKDISABLENONESSENTIAL), FALSE);
  51. ::EnableWindow(GetDlgItem(IDC_CHECKHIDEMS), FALSE);
  52. ::EnableWindow(GetDlgItem(IDC_LISTSERVICES), FALSE);
  53. return 0;
  54. }
  55. };
  56. #endif //__PAGESERVICES_H_