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.

49 lines
1.3 KiB

  1. // Copyright (c) 1997-1999 Microsoft Corporation
  2. #ifndef IDDLG_HPP_INCLUDED
  3. #define IDDLG_HPP_INCLUDED
  4. #pragma once
  5. #include "resource.h"
  6. #include "..\Common\WbemPageHelper.h"
  7. #include <chstring.h>
  8. #include "state.h"
  9. #define NET_API_STATUS DWORD
  10. #define NETSETUP_NAME_TYPE DWORD
  11. //---------------------------------------------------------------------
  12. class IDChangesDialog : public CDialogImpl<IDChangesDialog>,
  13. public WBEMPageHelper
  14. {
  15. public:
  16. IDChangesDialog(WbemServiceThread *serviceThread,
  17. State &state);
  18. virtual ~IDChangesDialog();
  19. enum { IDD = IDD_CHANGES };
  20. BEGIN_MSG_MAP(IDChangesDialog)
  21. MESSAGE_HANDLER(WM_INITDIALOG, OnInit)
  22. COMMAND_HANDLER(IDC_CHANGE, BN_CLICKED, OnCommand)
  23. END_MSG_MAP()
  24. // Handler prototypes:
  25. LRESULT OnInit(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  26. LRESULT OnCommand(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  27. private:
  28. State &m_state;
  29. void enable();
  30. NET_API_STATUS myNetValidateName(const CHString& name,
  31. NETSETUP_NAME_TYPE nameType);
  32. bool validateName(HWND dialog,
  33. int nameResID,
  34. const CHString &name,
  35. NETSETUP_NAME_TYPE nameType);
  36. bool validateShortComputerName(HWND dialog);
  37. bool onOKButton();
  38. bool validateDomainOrWorkgroupName(HWND dialog);
  39. };
  40. #endif IDDLG_HPP_INCLUDED