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.

121 lines
3.1 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 hwndDlg){}
  10. virtual void OnOk(HWND hwndDlg){}
  11. virtual void OnCommand(HWND hwndDlg,WORD NotifyId, WORD ItemId){}
  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. static LPCTSTR m_szUsrColumns;
  59. public:
  60. CUserColSelectDlg()
  61. {
  62. m_wDlgID=IDD_SELECTUSERCOLUMNS;
  63. Load();
  64. }
  65. //BUGBUG cannot use destructors for global objects
  66. //because of peculiar initialization procedure (look at main.cpp (2602))
  67. //~CUserColSelectDlg(){Save();};
  68. BOOL Load();
  69. BOOL Save();
  70. void OnInitDialog(HWND hwndDlg);
  71. void OnOk(HWND hwndDlg);
  72. UserColumn *GetColumns(){return m_UsrColumns;};
  73. };
  74. //-----------------------------------------------------------------------------------------
  75. //"Send Message" dialog class
  76. const USHORT MSG_TITLE_LENGTH = 64;
  77. const USHORT MSG_MESSAGE_LENGTH = MAX_PATH*2;
  78. class CSendMessageDlg : public CUsrDialog
  79. {
  80. protected:
  81. TCHAR m_szTitle[MSG_TITLE_LENGTH+1];
  82. TCHAR m_szMessage[MSG_MESSAGE_LENGTH+1];
  83. public:
  84. CSendMessageDlg(){m_wDlgID=IDD_MESSAGE;}
  85. void OnInitDialog(HWND hwndDlg);
  86. void OnOk(HWND hwndDlg);
  87. void OnCommand(HWND hwndDlg,WORD NotifyId, WORD ItemId);
  88. LPCTSTR GetTitle(){return m_szTitle;};
  89. LPCTSTR GetMessage(){return m_szMessage;};
  90. };
  91. //-----------------------------------------------------------------------------------------
  92. //"Connect Password Required" dialog class
  93. class CConnectPasswordDlg : public CUsrDialog
  94. {
  95. protected:
  96. TCHAR m_szPassword[PASSWORD_LENGTH+1];
  97. UINT m_ids; // prompt string
  98. public:
  99. CConnectPasswordDlg(UINT ids){m_wDlgID=IDD_CONNECT_PASSWORD; m_ids = ids;}
  100. void OnInitDialog(HWND hwndDlg);
  101. void OnOk(HWND hwndDlg);
  102. LPCTSTR GetPassword(){return m_szPassword;};
  103. };