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.

75 lines
2.4 KiB

  1. #ifndef __SetSht_h__
  2. #define __SetSht_h__
  3. ////////////////////////////////////////////////////////////////////////////////////////////////////
  4. //#pragma warning( disable : 4786 )
  5. #include <map>
  6. using namespace std;
  7. #include "PropWnd2.h"
  8. ////////////////////////////////////////////////////////////////////////////////////////////////////
  9. class CSettingsSheet {
  10. private:
  11. // Static Data
  12. static CSettingsSheet* ms_pSettingsSheet;
  13. static map< UINT, CPropertyDataWindow2* > ms_PropertyWindows;
  14. static map< UINT, HWND > ms_FocusList;
  15. static list< UINT > ms_CategoryIDList;
  16. // Static fns
  17. static BOOL APIENTRY DlgProc( HWND hDlg, UINT message, WPARAM uParam, LPARAM lParam );
  18. private: // DATA
  19. CPropertySheetPage m_PropertySheetPage;
  20. CPropertyDataWindow2* m_pCategoryList;
  21. HWND m_hWndDlg;
  22. UINT m_uPropWndShowing;
  23. public:
  24. CSettingsSheet( void );
  25. ~CSettingsSheet( void );
  26. LPCPROPSHEETPAGE GetPropertySheet( void ) const { return &m_PropertySheetPage;}
  27. inline CPropertyDataWindow2* GetPropWnd( UINT idCategory ) { return ms_PropertyWindows[ idCategory ]; }
  28. inline HWND GetHwnd( UINT idCategory ) const { return ms_PropertyWindows[ idCategory ] -> GetHwnd(); }
  29. LPTSTR GetStringData( UINT idCategory, UINT idEdit, LPTSTR* sz );
  30. inline CPropertyDataWindow2* GetCatWnd() { return m_pCategoryList; }
  31. inline BOOL GetCategoryCheck( UINT idCategory ) { return m_pCategoryList -> GetCheck( idCategory ); }
  32. inline void SetCategoryCheck( UINT idCategory, BOOL bSet ) { m_pCategoryList -> SetCheck( idCategory, bSet ); }
  33. BOOL GetCheckData( UINT idCategory, UINT idCheck );
  34. BOOL SetCheckData( UINT idCategory, UINT idCheck, BOOL bSet );
  35. void EnableWindow( UINT idCategory, BOOL bShow );
  36. BOOL IsShowing( UINT idCategory );
  37. void ShowWindow( UINT idCategory, BOOL bShow );
  38. void ShowWindow( HWND hWnd, BOOL bShow );
  39. void PrepSettings(void);
  40. void WriteSettings( void );
  41. void WriteToINF( HANDLE hFile );
  42. int SpewToListBox( HWND hwndList, int iStartLine ) ;
  43. void SetFocus( UINT catID );
  44. static bool IsGateKeeperModeSelected(void);
  45. private:
  46. void _KillPropertyDataWindows( void );
  47. BOOL _InitWindows( void );
  48. BOOL _AddPropertyDataWindows( int iX, int iY, int iWidth, int iHeight );
  49. BOOL _IsDataValid( void );
  50. void _SetButtons( void );
  51. void _ReadSettings( void );
  52. BOOL _INFComment( HANDLE hFile, LPCTSTR sz );
  53. };
  54. #endif // __SetSht_h__