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.

136 lines
3.5 KiB

  1. #ifndef _DsPropWnd2_h_
  2. #define _DsPropWnd2_h_
  3. #include "PropWnd2.h"
  4. #include <deque>
  5. using namespace std;
  6. class CWebViewInfo
  7. {
  8. public:
  9. CWebViewInfo()
  10. {
  11. m_szWebViewName [0] = '\0';
  12. m_szWebViewURL [0] = '\0';
  13. m_szWebViewServer[0] = '\0';
  14. }
  15. TCHAR m_szWebViewName[MAX_PATH];
  16. TCHAR m_szWebViewURL[MAX_PATH];
  17. TCHAR m_szWebViewServer[MAX_PATH];
  18. void SetWebView(LPCTSTR szServer, LPCTSTR szName=NULL, LPCTSTR szURL=NULL);
  19. } ;
  20. CWebViewInfo* GetWebViewInfo();
  21. class CDsPropWnd2 : public CPropertyDataWindow2
  22. {
  23. friend class CCallModeSheet;
  24. private:
  25. static const int MAXSERVERS;
  26. private:
  27. deque< LPTSTR > m_serverDQ;
  28. // list< LPTSTR > m_oldServerList;
  29. int m_defaultServer;
  30. HWND m_hwndList;
  31. public:
  32. CDsPropWnd2( HWND hwndParent, int iX, int iY, int iWidth, int iHeight );
  33. ~CDsPropWnd2();
  34. void ReadSettings( void );
  35. void WriteSettings( BOOL fGkMode );
  36. void SetButtons();
  37. BOOL WriteToINF( BOOL fGkMode, HANDLE hFile );
  38. int SpewToListBox( HWND hwndList, int iStartLine );
  39. void PrepSettings(BOOL fGkMode);
  40. BOOL DoCommand(WPARAM wParam, LPARAM lParam);
  41. void QueryWizNext(void);
  42. inline BOOL DirectoryEnabled()
  43. {
  44. HWND hwndBut = GetDlgItem( m_hwnd, IDC_ALLOW_USER_TO_USE_DIRECTORY_SERVICES );
  45. return hwndBut && Button_GetCheck( hwndBut );
  46. }
  47. inline BOOL GatewayEnabled()
  48. {
  49. HWND hwndBut = GetDlgItem( m_hwnd, IDC_CHECK_GATEWAY);
  50. return hwndBut && Button_GetCheck( hwndBut );
  51. }
  52. inline BOOL AllowUserToAdd()
  53. {
  54. HWND hwndBut = GetDlgItem( m_hwnd, IDC_PREVENT_THE_USER_FROM_ADDING_NEW_SERVERS );
  55. return hwndBut && !Button_GetCheck( hwndBut );
  56. }
  57. inline int CountServers()
  58. {
  59. return m_serverDQ.size();
  60. }
  61. private:
  62. BOOL IsWebView(LPCTSTR szServer) { return(0 == lstrcmp(szServer, GetWebViewInfo()->m_szWebViewServer)); }
  63. BOOL IsWebView(int index) { return(IsWebView(m_serverDQ.at(index))); }
  64. void SetWebView(LPCTSTR szServer, LPCTSTR szName=NULL, LPCTSTR szURL=NULL);
  65. BOOL IsWebViewAllowed() { return(!IsDlgButtonChecked(m_hwnd, IDC_DISABLE_WEBDIR)); }
  66. BOOL IsDefault(int index) { return(index == m_defaultServer); }
  67. void _UpdateServerList();
  68. BOOL _SetAsDefault( int iIndex );
  69. void _EditCurSel( void );
  70. void _EditCurSelWebView();
  71. BOOL _DeleteCurSel( void );
  72. void _MoveCurSel( int iPlaces );
  73. void _AddServer( LPTSTR szServer );
  74. LRESULT CALLBACK _WndProc( HWND hwnd, UINT uiMsg, WPARAM wParam, LPARAM lParam );
  75. private:
  76. static LRESULT CALLBACK DsPropWndProc( HWND hwnd, UINT uiMsg, WPARAM wParam, LPARAM lParam );
  77. };
  78. class CGkPropWnd2 : public CPropertyDataWindow2
  79. {
  80. friend class CCallModeSheet;
  81. public:
  82. CGkPropWnd2( HWND hwndParent, int iX, int iY, int iWidth, int iHeight );
  83. ~CGkPropWnd2();
  84. void ReadSettings( void );
  85. void WriteSettings( BOOL fGkMode );
  86. void SetButtons();
  87. BOOL WriteToINF( BOOL fGkMode, HANDLE hFile );
  88. int SpewToListBox( HWND hwndList, int iStartLine );
  89. void PrepSettings(BOOL fGkMode);
  90. BOOL DoCommand(WPARAM wParam, LPARAM lParam);
  91. void QueryWizNext();
  92. private:
  93. void SetWebView(LPCTSTR szServer, LPCTSTR szName=NULL, LPCTSTR szURL=NULL);
  94. BOOL IsWebViewAllowed() { return(!IsDlgButtonChecked(m_hwnd, IDC_DISABLE_WEBDIR_GK)); }
  95. void _EditCurSelWebView();
  96. LRESULT CALLBACK _WndProc( HWND hwnd, UINT uiMsg, WPARAM wParam, LPARAM lParam );
  97. private:
  98. static LRESULT CALLBACK GkPropWndProc( HWND hwnd, UINT uiMsg, WPARAM wParam, LPARAM lParam );
  99. };
  100. #endif