Leaked source code of windows server 2003
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.

80 lines
2.0 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999 - 1999
  6. //
  7. // File: tfcprop.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifndef _TFCPROP_H_
  11. #define _TFCPROP_H_
  12. class PropertyPage
  13. {
  14. protected:
  15. PropertyPage() { ASSERT(0); } // default, should never be called}
  16. PropertyPage(UINT uIDD);
  17. virtual ~PropertyPage();
  18. public:
  19. // dlg notifications
  20. virtual BOOL OnInitDialog();
  21. virtual BOOL OnSetActive();
  22. virtual BOOL OnKillActive();
  23. virtual BOOL UpdateData(BOOL fSuckFromDlg = TRUE);
  24. virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  25. virtual BOOL OnNotify(UINT idCtrl, NMHDR* pnmh);
  26. virtual void OnDestroy();
  27. virtual BOOL OnApply();
  28. virtual void OnCancel();
  29. virtual void OnOK();
  30. virtual BOOL OnWizardFinish();
  31. virtual LRESULT OnWizardNext();
  32. virtual LRESULT OnWizardBack();
  33. virtual void OnHelp(LPHELPINFO lpHelp);
  34. virtual void OnContextHelp(HWND hwnd);
  35. public:
  36. HWND m_hWnd;
  37. PROPSHEETPAGE m_psp;
  38. HWND GetDlgItem(UINT uIDD) { return ::GetDlgItem(m_hWnd, uIDD); }
  39. HWND GetDlgItem(HWND hWnd, UINT uIDD) { return ::GetDlgItem(hWnd, uIDD); }
  40. LRESULT SendDlgItemMessage(
  41. int nIDDlgItem,
  42. UINT uMsg,
  43. WPARAM wParam=0,
  44. LPARAM lParam=0)
  45. {
  46. return ::SendDlgItemMessage(m_hWnd, nIDDlgItem, uMsg, wParam, lParam);
  47. }
  48. void SetModified(BOOL fModified = TRUE)
  49. {
  50. if (fModified)
  51. PropSheet_Changed( ::GetParent(m_hWnd), m_hWnd);
  52. else
  53. PropSheet_UnChanged( ::GetParent(m_hWnd), m_hWnd);
  54. }
  55. HWND GetParent() { return ::GetParent(m_hWnd); }
  56. void HideControls();
  57. };
  58. INT_PTR CALLBACK
  59. dlgProcPropPage(
  60. HWND hwndDlg,
  61. UINT uMsg,
  62. WPARAM wParam,
  63. LPARAM lParam );
  64. #endif //_TFCPROP_H_