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.

215 lines
3.6 KiB

  1. /*++
  2. Copyright (c) 1994-2001 Microsoft Corporation
  3. Module Name :
  4. connects.h
  5. Abstract:
  6. "Connect to a single server" dialog definitions
  7. Author:
  8. Ronald Meijer (ronaldm)
  9. Sergei Antonov (sergeia)
  10. Project:
  11. Internet Services Manager
  12. Revision History:
  13. --*/
  14. #ifndef __CONNECTS_H__
  15. #define __CONNECTS_H__
  16. class CIISMachine;
  17. #define EXTGUID TCHAR
  18. //
  19. // CLoginDlg dialog
  20. //
  21. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  22. //
  23. // Different ways to display this dialog
  24. //
  25. enum
  26. {
  27. LDLG_ACCESS_DENIED, // Access denied
  28. LDLG_ENTER_PASS, // Enter password
  29. LDLG_IMPERSONATION, // Change impersonation
  30. };
  31. class CLoginDlg : public CDialog
  32. /*++
  33. Class Description:
  34. Log-in dialog. Brought up either to enter the password, or to provide
  35. both username and password
  36. Public Interface:
  37. --*/
  38. {
  39. //
  40. // Construction
  41. //
  42. public:
  43. CLoginDlg(
  44. IN int nType, // See LDLG_ definitions above
  45. IN CIISMachine * pMachine,
  46. IN CWnd * pParent = NULL
  47. );
  48. //
  49. // Access
  50. //
  51. public:
  52. BOOL UserNameChanged() const;
  53. //
  54. // Dialog Data
  55. //
  56. protected:
  57. //{{AFX_DATA(CLoginDlg)
  58. enum { IDD = IDD_LOGIN };
  59. CString m_strUserName;
  60. CString m_strPassword;
  61. CEdit m_edit_UserName;
  62. CEdit m_edit_Password;
  63. CStatic m_static_Prompt;
  64. CButton m_button_Ok;
  65. //}}AFX_DATA
  66. //
  67. // Overrides
  68. //
  69. protected:
  70. //{{AFX_VIRTUAL(CLoginDlg)
  71. protected:
  72. virtual void DoDataExchange(CDataExchange * pDX);
  73. //}}AFX_VIRTUAL
  74. //
  75. // Implementation
  76. //
  77. protected:
  78. //{{AFX_MSG(CLoginDlg)
  79. virtual BOOL OnInitDialog();
  80. virtual void OnOK();
  81. //}}AFX_MSG
  82. DECLARE_MESSAGE_MAP()
  83. void SetControlStates();
  84. private:
  85. int m_nType;
  86. CIISMachine * m_pMachine;
  87. CString m_strOriginalUserName;
  88. };
  89. class ConnectServerDlg : public CDialog
  90. {
  91. /*++
  92. Class Description:
  93. Connect to a server dialog. Also used to ask for the cluster controller
  94. or for a server to add to the cluster.
  95. Public Interface:
  96. ConnectServerDlg : Constructor
  97. GetMachine : Get the created machine object (may or may not have a created
  98. interface)
  99. --*/
  100. //
  101. // Construction
  102. //
  103. public:
  104. ConnectServerDlg(
  105. IN CWnd * pParent = NULL
  106. );
  107. //
  108. // Access Functions
  109. //
  110. public:
  111. CIISMachine * GetMachine() { return m_pMachine; }
  112. //
  113. // Dialog Data
  114. //
  115. protected:
  116. //{{AFX_DATA(ConnectServerDlg)
  117. enum { IDD = IDD_CONNECT_SERVER };
  118. BOOL m_fImpersonate;
  119. CString m_strServerName;
  120. CString m_strUserName;
  121. CString m_strPassword;
  122. CEdit m_edit_UserName;
  123. CEdit m_edit_Password;
  124. CEdit m_edit_ServerName;
  125. CStatic m_static_UserName;
  126. CStatic m_static_Password;
  127. CButton m_button_Ok;
  128. //}}AFX_DATA
  129. //
  130. // Overrides
  131. //
  132. protected:
  133. //{{AFX_VIRTUAL(ConnectServerDlg)
  134. protected:
  135. virtual void DoDataExchange(CDataExchange * pDX);
  136. //}}AFX_VIRTUAL
  137. //
  138. // Implementation
  139. //
  140. protected:
  141. //{{AFX_MSG(ConnectServerDlg)
  142. virtual BOOL OnInitDialog();
  143. virtual void OnOK();
  144. afx_msg void OnCheckConnectAs();
  145. afx_msg void OnButtonBrowse();
  146. afx_msg void OnButtonHelp();
  147. //}}AFX_MSG
  148. DECLARE_MESSAGE_MAP()
  149. void SetControlStates();
  150. private:
  151. CIISMachine * m_pMachine;
  152. };
  153. //
  154. // Inline Expansion
  155. //
  156. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  157. inline BOOL CLoginDlg::UserNameChanged() const
  158. {
  159. //
  160. // TRUE if the user name is not the original user name
  161. //
  162. return m_strOriginalUserName.CompareNoCase(m_strUserName);
  163. }
  164. #endif // __CONNECTS_H__