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.

76 lines
2.2 KiB

  1. #ifndef GRPINFO_H_INCLUDED
  2. #define GRPINFO_H_INCLUDED
  3. // base implementation of the page/wizard object - handles state
  4. class CGroupPageBase
  5. {
  6. public:
  7. // Public interface (in the case where you're not using a derived class
  8. CGroupPageBase(CUserInfo* pUserInfo, CDPA<CGroupInfo>* pGroupList);
  9. ~CGroupPageBase()
  10. {
  11. if (NULL != m_hBoldFont)
  12. DeleteObject((HGDIOBJ) m_hBoldFont);
  13. }
  14. INT_PTR HandleGroupMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  15. BOOL GetSelectedGroup(HWND hwnd, LPTSTR pszGroupOut, DWORD cchGroup, CUserInfo::GROUPPSEUDONYM* pgsOut);
  16. protected:
  17. void InitializeLocalGroupCombo(HWND hwndCombo);
  18. void SetGroupDescription(HWND hwndCombo, HWND hwndEdit);
  19. void BoldGroupNames(HWND hwnd);
  20. void SelectGroup(HWND hwnd, LPCTSTR pszSelect);
  21. UINT RadioIdForGroup(LPCTSTR pszGroup);
  22. protected:
  23. // Message handlers
  24. BOOL OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam);
  25. BOOL OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
  26. void OnRadioChanged(HWND hwnd, UINT idRadio);
  27. protected:
  28. // Data
  29. CUserInfo* m_pUserInfo;
  30. CDPA<CGroupInfo>* m_pGroupList;
  31. HFONT m_hBoldFont;
  32. };
  33. // wizard page for exposing the group membership
  34. class CGroupWizardPage: public CPropertyPage, public CGroupPageBase
  35. {
  36. public:
  37. CGroupWizardPage(CUserInfo* pUserInfo,
  38. CDPA<CGroupInfo>* pGroupList):
  39. CGroupPageBase(pUserInfo, pGroupList) {}
  40. protected:
  41. // Message handlers
  42. virtual INT_PTR DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  43. BOOL OnNotify(HWND hwnd, int idCtrl, LPNMHDR pnmh);
  44. };
  45. // property page for exposing group membership
  46. class CGroupPropertyPage: public CPropertyPage, public CGroupPageBase
  47. {
  48. public:
  49. CGroupPropertyPage(CUserInfo* pUserInfo,
  50. CDPA<CGroupInfo>* pGroupList):
  51. CGroupPageBase(pUserInfo, pGroupList) {}
  52. protected:
  53. // Message handlers
  54. virtual INT_PTR DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  55. BOOL OnNotify(HWND hwnd, int idCtrl, LPNMHDR pnmh);
  56. };
  57. #endif // !GRPINFO_H_INCLUDED