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.

61 lines
1.8 KiB

  1. // Copyright (c) 1997-1999 Microsoft Corporation
  2. #ifndef __NETWORKIDPAGE__
  3. #define __NETWORKIDPAGE__
  4. #pragma once
  5. #include "atlsnap.h"
  6. #include "resource.h"
  7. #include "state.h"
  8. #include "..\Common\WbemPageHelper.h"
  9. //---------------------------------------------------------------------
  10. class NetworkIDPage : public CSnapInPropertyPageImpl<NetworkIDPage>,
  11. public WBEMPageHelper
  12. {
  13. public:
  14. NetworkIDPage(WbemServiceThread *serviceThread,
  15. LONG_PTR lNotifyHandle,
  16. bool bDeleteHandle = false,
  17. TCHAR* pTitle = NULL);
  18. ~NetworkIDPage();
  19. enum { IDD = IDD_NETID };
  20. typedef CSnapInPropertyPageImpl<NetworkIDPage> _baseClass;
  21. BEGIN_MSG_MAP(NetworkIDPage)
  22. MESSAGE_HANDLER(WM_INITDIALOG, OnInit)
  23. MESSAGE_HANDLER(WM_ASYNC_CIMOM_CONNECTED, OnConnected)
  24. COMMAND_HANDLER(IDC_CHANGE, BN_CLICKED, OnChangeBtn)
  25. COMMAND_HANDLER(IDC_NETID_COMMENT, EN_CHANGE, OnComment)
  26. MESSAGE_HANDLER(WM_HELP, OnF1Help)
  27. MESSAGE_HANDLER(WM_CONTEXTMENU, OnContextHelp)
  28. CHAIN_MSG_MAP(_baseClass)
  29. END_MSG_MAP()
  30. // Handler prototypes:
  31. LRESULT OnInit(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  32. LRESULT OnConnected(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  33. LRESULT OnChangeBtn(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  34. LRESULT OnComment(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  35. BOOL OnApply();
  36. LRESULT OnF1Help(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  37. LRESULT OnContextHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  38. private:
  39. State m_state;
  40. CWbemClassObject m_computer;
  41. CWbemClassObject m_OS;
  42. CWbemClassObject m_DNS;
  43. void refresh();
  44. bool CimomIsReady();
  45. LONG_PTR m_lNotifyHandle;
  46. bool m_bDeleteHandle;
  47. };
  48. #endif __NETWORKIDPAGE__