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.

48 lines
1.0 KiB

  1. // Copyright (C) Microsoft Corporation 1993-1997, All Rights reserved.
  2. #ifndef _CPROP_H_
  3. #define _CPROP_H_
  4. #include <prsht.h>
  5. #ifndef _CDLG_H_
  6. #include "cdlg.h"
  7. #endif
  8. class CPropPage : public CDlg
  9. {
  10. public:
  11. CPropPage(int idTemplate = 0);
  12. PROPSHEETPAGE m_psp;
  13. virtual BOOL OnNotify(UINT code) { return FALSE; }
  14. void SetTitle(int idResource) const {
  15. PostMessage(GetParent(m_hWnd), PSM_SETTITLE, 0,
  16. (LPARAM) GetStringResource(idResource));
  17. }
  18. void SetWizButtons(DWORD dwFlags) const { PostMessage(GetParent(m_hWnd),
  19. PSM_SETWIZBUTTONS, 0, (LPARAM) dwFlags); }
  20. void SetResult(LONG result) const { ::SetWindowLong(m_hWnd, DWLP_MSGRESULT, result); }
  21. int m_idTemplate;
  22. protected:
  23. friend BOOL CALLBACK CPropPageProc(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam);
  24. };
  25. class CPropSheet
  26. {
  27. public:
  28. CPropSheet(PCSTR pszTitle, DWORD dwFlags = PSH_DEFAULT,
  29. HWND hwndParent = NULL);
  30. ~CPropSheet();
  31. void AddPage(CPropPage* pPage);
  32. int DoModal(void);
  33. PROPSHEETHEADER m_psh;
  34. BOOL m_fNoCsHelp;
  35. };
  36. #endif // _CPROP_H_