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.

387 lines
9.8 KiB

  1. /*******************************************************************************
  2. *
  3. * dialogs.h
  4. *
  5. * declarations of all the dialog classes
  6. *
  7. * copyright notice: Copyright 1997, Citrix Systems Inc.
  8. * Copyright (c) 1998 - 1999 Microsoft Corporation
  9. *
  10. * $Author: donm $ Don Messerli
  11. *
  12. * $Log: N:\nt\private\utils\citrix\winutils\tsadmin\VCS\dialogs.h $
  13. *
  14. * Rev 1.3 19 Jan 1998 16:46:10 donm
  15. * new ui behavior for domains and servers
  16. *
  17. * Rev 1.2 13 Oct 1997 18:40:20 donm
  18. * update
  19. *
  20. * Rev 1.1 26 Aug 1997 19:14:28 donm
  21. * bug fixes/changes from WinFrame 1.7
  22. *
  23. * Rev 1.0 30 Jul 1997 17:11:32 butchd
  24. * Initial revision.
  25. *
  26. *******************************************************************************/
  27. #include "threads.h"
  28. #include "led.h"
  29. /////////////////////////////////////////////////////////////////////////////
  30. // CSendMessageDlg dialog
  31. class CSendMessageDlg : public CDialog
  32. {
  33. // Construction
  34. public:
  35. CSendMessageDlg(CWnd* pParent = NULL); // standard constructor
  36. // Dialog Data
  37. //{{AFX_DATA(CSendMessageDlg)
  38. enum { IDD = IDD_MESSAGE };
  39. // NOTE: the ClassWizard will add data members here
  40. //}}AFX_DATA
  41. TCHAR m_szUserName[USERNAME_LENGTH+1];
  42. TCHAR m_szTitle[MSG_TITLE_LENGTH+1];
  43. TCHAR m_szMessage[MSG_MESSAGE_LENGTH+1];
  44. // Overrides
  45. // ClassWizard generated virtual function overrides
  46. //{{AFX_VIRTUAL(CSendMessageDlg)
  47. protected:
  48. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  49. //}}AFX_VIRTUAL
  50. // Implementation
  51. protected:
  52. // Generated message map functions
  53. //{{AFX_MSG(CSendMessageDlg)
  54. virtual BOOL OnInitDialog();
  55. virtual void OnOK();
  56. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  57. afx_msg void OnCommandHelp(void);
  58. //}}AFX_MSG
  59. DECLARE_MESSAGE_MAP()
  60. };
  61. /////////////////////////////////////////////////////////////////////////////
  62. // CShadowStartDlg dialog
  63. class CShadowStartDlg : public CDialog
  64. {
  65. // Construction
  66. public:
  67. CShadowStartDlg(CWnd* pParent = NULL); // standard constructor
  68. // Dialog Data
  69. //{{AFX_DATA(CShadowStartDlg)
  70. enum { IDD = IDD_SHADOWSTART };
  71. // NOTE: the ClassWizard will add data members here
  72. //}}AFX_DATA
  73. DWORD m_ShadowHotkeyShift;
  74. int m_ShadowHotkeyKey;
  75. // Overrides
  76. // ClassWizard generated virtual function overrides
  77. //{{AFX_VIRTUAL(CShadowStartDlg)
  78. protected:
  79. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  80. //}}AFX_VIRTUAL
  81. // Implementation
  82. protected:
  83. // Generated message map functions
  84. //{{AFX_MSG(CShadowStartDlg)
  85. virtual BOOL OnInitDialog();
  86. virtual void OnOK();
  87. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  88. afx_msg void OnSelChange( );
  89. afx_msg void OnCommandHelp(void);
  90. //}}AFX_MSG
  91. DECLARE_MESSAGE_MAP()
  92. };
  93. /////////////////////////////////////////////////////////////////////////////
  94. // CPasswordDlg dialog
  95. typedef enum _PwdMode {
  96. PwdDlg_UserMode,
  97. PwdDlg_WinStationMode
  98. } PwdMode;
  99. class CPasswordDlg : public CDialog
  100. {
  101. // Construction
  102. public:
  103. CPasswordDlg(CWnd* pParent = NULL); // standard constructor
  104. LPCTSTR GetPassword() { return m_szPassword; }
  105. void SetDialogMode(PwdMode mode) { m_DlgMode = mode; }
  106. // Dialog Data
  107. //{{AFX_DATA(CPasswordDlg)
  108. enum { IDD = IDD_CONNECT_PASSWORD };
  109. // NOTE: the ClassWizard will add data members here
  110. //}}AFX_DATA
  111. // Overrides
  112. // ClassWizard generated virtual function overrides
  113. //{{AFX_VIRTUAL(CPasswordDlg)
  114. protected:
  115. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  116. //}}AFX_VIRTUAL
  117. // Implementation
  118. protected:
  119. PwdMode m_DlgMode;
  120. TCHAR m_szPassword[PASSWORD_LENGTH+1];
  121. // Generated message map functions
  122. //{{AFX_MSG(CPasswordDlg)
  123. virtual BOOL OnInitDialog();
  124. virtual void OnOK();
  125. //}}AFX_MSG
  126. DECLARE_MESSAGE_MAP()
  127. };
  128. /////////////////////////////////////////////////////////////////////////////
  129. // CPreferencesDlg dialog
  130. const int MAX_AUTOREFRESH_DIGITS = 5;
  131. const int MIN_AUTOREFRESH_VALUE = 1;
  132. const int MAX_AUTOREFRESH_VALUE = 9999;
  133. class CPreferencesDlg : public CDialog
  134. {
  135. // Construction
  136. public:
  137. CPreferencesDlg(CWnd* pParent = NULL); // standard constructor
  138. // Dialog Data
  139. //{{AFX_DATA(CPreferencesDlg)
  140. enum { IDD = IDD_PREFERENCES };
  141. // NOTE: the ClassWizard will add data members here
  142. //}}AFX_DATA
  143. // Overrides
  144. // ClassWizard generated virtual function overrides
  145. //{{AFX_VIRTUAL(CPreferencesDlg)
  146. protected:
  147. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  148. //}}AFX_VIRTUAL
  149. private:
  150. // Implementation
  151. protected:
  152. // Generated message map functions
  153. //{{AFX_MSG(CPreferencesDlg)
  154. virtual void OnOK();
  155. virtual BOOL OnInitDialog();
  156. afx_msg void OnPreferencesProcManual();
  157. afx_msg void OnPreferencesProcEvery();
  158. afx_msg void OnPreferencesStatusEvery();
  159. afx_msg void OnPreferencesStatusManual();
  160. afx_msg void OnClose();
  161. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  162. //}}AFX_MSG
  163. DECLARE_MESSAGE_MAP()
  164. };
  165. /////////////////////////////////////////////////////////////////////////////
  166. // CStatusDlg dialog
  167. class CStatusDlg : public CDialog
  168. {
  169. // Construction
  170. public:
  171. CStatusDlg(CWinStation *pWinStation, UINT Id, CWnd* pParent = NULL); // standard constructor
  172. CWSStatusThread *m_pWSStatusThread;
  173. protected:
  174. virtual void InitializeStatus();
  175. virtual void SetInfoFields( PWINSTATIONINFORMATION pCurrent,
  176. PWINSTATIONINFORMATION pNew );
  177. // Overrides
  178. // ClassWizard generated virtual function overrides
  179. //{{AFX_VIRTUAL(CStatusDlg)
  180. protected:
  181. virtual void PostNcDestroy();
  182. virtual BOOL PreTranslateMessage(MSG *pMsg);
  183. //}}AFX_VIRTUAL
  184. // Implementation
  185. protected:
  186. CWinStation *m_pWinStation;
  187. // ULONG m_LogonId;
  188. BOOL m_bReadOnly;
  189. WINSTATIONNAME m_WSName;
  190. SIZE m_LittleSize;
  191. SIZE m_BigSize;
  192. BOOL m_bWeAreLittle;
  193. BOOL m_bResetCounters;
  194. BOOL m_bReliable;
  195. WINSTATIONINFORMATION m_WSInfo;
  196. PROTOCOLSTATUS m_BaseStatus;
  197. UINT m_IBytesPerFrame;
  198. UINT m_OBytesPerFrame;
  199. TCHAR m_szIPercentFrameErrors[10];
  200. TCHAR m_szOPercentFrameErrors[10];
  201. TCHAR m_szICompressionRatio[10];
  202. TCHAR m_szOCompressionRatio[10];
  203. // Generated message map functions
  204. //{{AFX_MSG(CStatusDlg)
  205. virtual void OnCancel();
  206. virtual BOOL OnInitDialog();
  207. afx_msg LRESULT OnStatusStart(WPARAM wParam, LPARAM lParam);
  208. afx_msg LRESULT OnStatusReady(WPARAM wParam, LPARAM lParam);
  209. afx_msg LRESULT OnStatusAbort(WPARAM wParam, LPARAM lParam);
  210. afx_msg LRESULT OnRefreshNow(WPARAM wParam, LPARAM lParam);
  211. afx_msg void OnResetcounters();
  212. afx_msg void OnClickedRefreshnow();
  213. //}}AFX_MSG
  214. DECLARE_MESSAGE_MAP()
  215. };
  216. /////////////////////////////////////////////////////////////////////////////
  217. // CAsyncStatusDlg dialog
  218. #define NUM_LEDS 6
  219. #define ASYNC_LED_TOGGLE_MSEC 200
  220. class CAsyncStatusDlg : public CStatusDlg
  221. {
  222. // Construction
  223. public:
  224. CAsyncStatusDlg(CWinStation *pWinStation, CWnd* pParent = NULL); // standard constructor
  225. ~CAsyncStatusDlg();
  226. HBRUSH m_hRedBrush;
  227. UINT_PTR m_LEDToggleTimer;
  228. CLed * m_pLeds[NUM_LEDS];
  229. // Dialog Data
  230. //{{AFX_DATA(CAsyncStatusDlg)
  231. enum { IDD = IDD_ASYNC_STATUS };
  232. // NOTE: the ClassWizard will add data members here
  233. //}}AFX_DATA
  234. // Overrides
  235. // ClassWizard generated virtual function overrides
  236. //{{AFX_VIRTUAL(CAsyncStatusDlg)
  237. protected:
  238. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  239. //}}AFX_VIRTUAL
  240. // Implementation
  241. protected:
  242. void SetInfoFields( PWINSTATIONINFORMATION pCurrent,
  243. PWINSTATIONINFORMATION pNew );
  244. void InitializeStatus();
  245. // Generated message map functions
  246. //{{AFX_MSG(CAsyncStatusDlg)
  247. afx_msg LRESULT OnStatusStart(WPARAM wParam, LPARAM lParam);
  248. afx_msg LRESULT OnStatusReady(WPARAM wParam, LPARAM lParam);
  249. afx_msg LRESULT OnStatusAbort(WPARAM wParam, LPARAM lParam);
  250. afx_msg LRESULT OnRefreshNow(WPARAM wParam, LPARAM lParam);
  251. afx_msg void OnResetcounters();
  252. afx_msg void OnClickedRefreshnow();
  253. afx_msg void OnMoreinfo();
  254. afx_msg void OnTimer(UINT nIDEvent);
  255. afx_msg void OnNcDestroy();
  256. virtual BOOL OnInitDialog();
  257. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  258. afx_msg void OnCommandHelp(void);
  259. //}}AFX_MSG
  260. DECLARE_MESSAGE_MAP()
  261. };
  262. /////////////////////////////////////////////////////////////////////////////
  263. // CNetworkStatusDlg dialog
  264. class CNetworkStatusDlg : public CStatusDlg
  265. {
  266. // Construction
  267. public:
  268. CNetworkStatusDlg(CWinStation *pWinStation, CWnd* pParent = NULL); // standard constructor
  269. // Dialog Data
  270. //{{AFX_DATA(CNetworkStatusDlg)
  271. enum { IDD = IDD_NETWORK_STATUS };
  272. // NOTE: the ClassWizard will add data members here
  273. //}}AFX_DATA
  274. // Overrides
  275. // ClassWizard generated virtual function overrides
  276. //{{AFX_VIRTUAL(CNetworkStatusDlg)
  277. protected:
  278. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  279. //}}AFX_VIRTUAL
  280. // Implementation
  281. protected:
  282. // Generated message map functions
  283. //{{AFX_MSG(CNetworkStatusDlg)
  284. afx_msg LRESULT OnStatusStart(WPARAM wParam, LPARAM lParam);
  285. afx_msg LRESULT OnStatusReady(WPARAM wParam, LPARAM lParam);
  286. afx_msg LRESULT OnStatusAbort(WPARAM wParam, LPARAM lParam);
  287. afx_msg LRESULT OnRefreshNow(WPARAM wParam, LPARAM lParam);
  288. afx_msg void OnResetcounters();
  289. afx_msg void OnClickedRefreshnow();
  290. afx_msg void OnMoreinfo();
  291. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  292. afx_msg void OnCommandHelp(void);
  293. //}}AFX_MSG
  294. DECLARE_MESSAGE_MAP()
  295. };
  296. /////////////////////////////////////////////////////////////////////////////
  297. // CMyDialog dialog
  298. class CMyDialog : public CDialog
  299. {
  300. // Construction
  301. public:
  302. CMyDialog(CWnd* pParent = NULL); // standard constructor
  303. // Dialog Data
  304. //{{AFX_DATA(CMyDialog)
  305. enum { IDD = IDD_DIALOG_FINDSERVER };
  306. CString m_cstrServerName;
  307. //}}AFX_DATA
  308. // Overrides
  309. // ClassWizard generated virtual function overrides
  310. //{{AFX_VIRTUAL(CMyDialog)
  311. protected:
  312. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  313. //}}AFX_VIRTUAL
  314. // Implementation
  315. protected:
  316. // Generated message map functions
  317. //{{AFX_MSG(CMyDialog)
  318. // NOTE: the ClassWizard will add member functions here
  319. //}}AFX_MSG
  320. DECLARE_MESSAGE_MAP()
  321. };