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.

85 lines
2.4 KiB

  1. // Copyright (c) 1997-1999 Microsoft Corporation
  2. #ifndef __GENERALPAGE__
  3. #define __GENERALPAGE__
  4. #pragma once
  5. #ifndef ATLASSERT
  6. #define ATLASSERT(expr) _ASSERTE(expr)
  7. #endif
  8. #include "atlsnap.h"
  9. #include "resource.h"
  10. #include "..\Common\WbemPageHelper.h"
  11. #include "..\common\serviceThread.h"
  12. //-----------------------------------------------------------------------------
  13. class GeneralPage : public CSnapInPropertyPageImpl<GeneralPage>,
  14. public WBEMPageHelper
  15. {
  16. private:
  17. IDataObject* m_pDataObject;
  18. CWbemClassObject m_OS;
  19. CWbemClassObject m_processor;
  20. CWbemClassObject m_memory;
  21. CWbemClassObject m_computer;
  22. // shared with the phone support dialog.
  23. bstr_t m_manufacturer;
  24. bool m_inited;
  25. HWND m_hAVI;
  26. void Init();
  27. bool CimomIsReady();
  28. void ConfigureProductID(LPTSTR lpPid);
  29. public:
  30. GeneralPage(WbemServiceThread *serviceThread,
  31. LONG_PTR lNotifyHandle,
  32. bool bDeleteHandle = false,
  33. TCHAR* pTitle = NULL,
  34. IDataObject* pDataObject = 0);
  35. ~GeneralPage();
  36. enum { IDD = IDD_GENERAL };
  37. typedef CSnapInPropertyPageImpl<GeneralPage> _baseClass;
  38. BEGIN_MSG_MAP(GeneralPage)
  39. MESSAGE_HANDLER(WM_INITDIALOG, OnInit)
  40. MESSAGE_HANDLER(WM_ASYNC_CIMOM_CONNECTED, OnConnected)
  41. MESSAGE_HANDLER(WM_HELP, OnF1Help)
  42. MESSAGE_HANDLER(WM_CONTEXTMENU, OnContextHelp)
  43. MESSAGE_HANDLER(WM_SYSCOLORCHANGE, OnSysColorChange)
  44. MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
  45. COMMAND_HANDLER(IDC_GEN_OEM_SUPPORT, BN_CLICKED, OnSupport)
  46. CHAIN_MSG_MAP(_baseClass)
  47. END_MSG_MAP()
  48. // Handler prototypes:
  49. LRESULT OnInit(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  50. LRESULT OnConnected(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  51. LRESULT OnF1Help(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  52. LRESULT OnContextHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  53. LRESULT OnSysColorChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  54. LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  55. LRESULT OnSupport(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  56. BOOL OnApply();
  57. BOOL OnKillActive()
  58. {
  59. return (m_inited?TRUE:FALSE);
  60. }
  61. DWORD GetServerTypeResourceID(void);
  62. LONG_PTR m_lNotifyHandle;
  63. bool m_bDeleteHandle;
  64. };
  65. INT_PTR CALLBACK PhoneSupportProc(HWND hDlg,
  66. UINT uMsg,
  67. WPARAM wParam,
  68. LPARAM lParam);
  69. #endif __GENERALPAGE__