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.

56 lines
2.0 KiB

  1. #ifndef __NEWUSERDLG_H
  2. #define __NEWUSERDLG_H
  3. #include <P3Admin.h>
  4. #include <tmplEdit.h>
  5. class CNewUserDlg : public CDialogImpl<CNewUserDlg>
  6. {
  7. public:
  8. typedef CDialogImpl<CNewUserDlg> BC;
  9. CNewUserDlg(IP3Users* pUsers, LPWSTR psDomainName, BOOL bCreateDefault = FALSE, BOOL bHashPassword = FALSE, BOOL bSAMAuthentication = FALSE, BOOL bConfirm = TRUE) :
  10. m_spUsers(pUsers),
  11. m_psDomainName(psDomainName),
  12. m_bCreateUser(bCreateDefault),
  13. m_bHashPW(bHashPassword),
  14. m_bSAM(bSAMAuthentication),
  15. m_bConfirm(bConfirm)
  16. {
  17. };
  18. enum { IDD = IDD_NEW_USER };
  19. BEGIN_MSG_MAP( CNewUserDlg )
  20. COMMAND_HANDLER (IDC_USER_NAME, EN_CHANGE, OnEditChange)
  21. COMMAND_HANDLER (IDC_PASSWORD, EN_CHANGE, OnEditChange)
  22. COMMAND_HANDLER (IDC_CONFIRM, EN_CHANGE, OnEditChange)
  23. COMMAND_HANDLER (IDC_USER_CREATEUSER, BN_CLICKED, OnCreateClicked)
  24. COMMAND_RANGE_HANDLER (IDOK, IDCANCEL, OnClose)
  25. MESSAGE_HANDLER (WM_INITDIALOG, OnInitDialog)
  26. END_MSG_MAP()
  27. // message handlers
  28. LRESULT OnEditChange ( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled );
  29. LRESULT OnCreateClicked ( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled );
  30. LRESULT OnClose ( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled );
  31. LRESULT OnInitDialog ( UINT mMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled );
  32. BOOL isHideDoNotShow(){ return !m_bConfirm; }
  33. tstring m_strName;
  34. BOOL m_bCreateUser;
  35. private:
  36. void EnableButtons();
  37. LPWSTR m_psDomainName;
  38. BOOL m_bConfirm;
  39. BOOL m_bSAM;
  40. BOOL m_bHashPW;
  41. CComPtr<IP3Users> m_spUsers;
  42. CWindowImplAlias<> m_wndAlias;
  43. };
  44. #endif //__NEWUSERDLG_H