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.

120 lines
3.2 KiB

  1. #include "resource.h"
  2. //Base class for simple dialogs
  3. class CUsrDialog
  4. {
  5. protected:
  6. WORD m_wDlgID;
  7. public:
  8. INT_PTR DoDialog(HWND hwndParent);
  9. virtual void OnInitDialog(HWND){ }
  10. virtual void OnOk(HWND){ }
  11. virtual void OnCommand(HWND, WORD, WORD){ }
  12. static INT_PTR CALLBACK DlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  13. };
  14. //-----------------------------------------------------------------------------------------
  15. //"Remote Control" dialog class
  16. class CShadowStartDlg : public CUsrDialog
  17. {
  18. protected:
  19. static LPCTSTR m_szShadowHotkeyKey;
  20. static LPCTSTR m_szShadowHotkeyShift;
  21. DWORD m_ShadowHotkeyKey;
  22. DWORD m_ShadowHotkeyShift;
  23. public:
  24. CShadowStartDlg();
  25. ~CShadowStartDlg();
  26. void OnInitDialog(HWND hwndDlg);
  27. void OnOk(HWND hwndDlg);
  28. DWORD GetShadowHotkeyKey(){return m_ShadowHotkeyKey;};
  29. DWORD GetShadowHotkeyShift(){return m_ShadowHotkeyShift;};
  30. };
  31. //-----------------------------------------------------------------------------------------
  32. //
  33. // Column ID enumeration
  34. //
  35. enum USERCOLUMNID
  36. {
  37. USR_COL_USERSNAME = 0,
  38. USR_COL_USERSESSION_ID,
  39. USR_COL_SESSION_STATUS,
  40. USR_COL_CLIENT_NAME,
  41. USR_COL_WINSTA_NAME,
  42. USR_MAX_COLUMN
  43. };
  44. struct UserColumn
  45. {
  46. DWORD dwNameID;
  47. DWORD dwChkBoxID;
  48. int Align;
  49. int Width;
  50. BOOL bActive;
  51. };
  52. //-----------------------------------------------------------------------------------------
  53. //"Select Columns" dialog class
  54. class CUserColSelectDlg : public CUsrDialog
  55. {
  56. protected:
  57. static UserColumn m_UsrColumns[USR_MAX_COLUMN];
  58. public:
  59. CUserColSelectDlg()
  60. {
  61. m_wDlgID=IDD_SELECTUSERCOLUMNS;
  62. Load();
  63. }
  64. //BUGBUG cannot use destructors for global objects
  65. //because of peculiar initialization procedure (look at main.cpp (2602))
  66. //~CUserColSelectDlg(){Save();};
  67. BOOL Load();
  68. BOOL Save();
  69. void OnInitDialog(HWND hwndDlg);
  70. void OnOk(HWND hwndDlg);
  71. UserColumn *GetColumns(){return m_UsrColumns;};
  72. };
  73. //-----------------------------------------------------------------------------------------
  74. //"Send Message" dialog class
  75. const USHORT MSG_TITLE_LENGTH = 64;
  76. const USHORT MSG_MESSAGE_LENGTH = MAX_PATH*2;
  77. class CSendMessageDlg : public CUsrDialog
  78. {
  79. protected:
  80. WCHAR m_szTitle[MSG_TITLE_LENGTH+1];
  81. WCHAR m_szMessage[MSG_MESSAGE_LENGTH+1];
  82. public:
  83. CSendMessageDlg(){m_wDlgID=IDD_MESSAGE;}
  84. void OnInitDialog(HWND hwndDlg);
  85. void OnOk(HWND hwndDlg);
  86. void OnCommand(HWND hwndDlg,WORD NotifyId, WORD ItemId);
  87. LPCTSTR GetTitle(){return m_szTitle;};
  88. LPCTSTR GetMessage(){return m_szMessage;};
  89. };
  90. //-----------------------------------------------------------------------------------------
  91. //"Connect Password Required" dialog class
  92. class CConnectPasswordDlg : public CUsrDialog
  93. {
  94. protected:
  95. WCHAR m_szPassword[PASSWORD_LENGTH+1];
  96. UINT m_ids; // prompt string
  97. public:
  98. CConnectPasswordDlg(UINT ids){m_wDlgID=IDD_CONNECT_PASSWORD; m_ids = ids;}
  99. void OnInitDialog(HWND hwndDlg);
  100. void OnOk(HWND hwndDlg);
  101. LPCTSTR GetPassword(){return m_szPassword;};
  102. };