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.

109 lines
2.4 KiB

  1. /*++
  2. Copyright (C) 1997-2001 Microsoft Corporation
  3. Module Name:
  4. Abstract:
  5. History:
  6. --*/
  7. #if !defined(AFX_PROPQUALSPG_H__42BE2BB5_536D_45D6_B307_4EEF803B35C9__INCLUDED_)
  8. #define AFX_PROPQUALSPG_H__42BE2BB5_536D_45D6_B307_4EEF803B35C9__INCLUDED_
  9. #if _MSC_VER > 1000
  10. #pragma once
  11. #endif // _MSC_VER > 1000
  12. // PropQualsPg.h : header file
  13. //
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CPropQualsPg dialog
  16. class CQual
  17. {
  18. public:
  19. CString m_strName;
  20. _variant_t m_var;
  21. long m_lFlavor;
  22. };
  23. typedef CList<CQual, CQual&> CQualList;
  24. class CPropQualsPg : public CPropertyPage
  25. {
  26. DECLARE_DYNCREATE(CPropQualsPg)
  27. // Construction
  28. public:
  29. CPropQualsPg();
  30. ~CPropQualsPg();
  31. // Dialog Data
  32. enum QUAL_MODE
  33. {
  34. QMODE_PROP,
  35. QMODE_CLASS,
  36. QMODE_METHOD
  37. };
  38. //{{AFX_DATA(CPropQualsPg)
  39. enum { IDD = IDD_QUALS };
  40. CListCtrl m_ctlQuals;
  41. //}}AFX_DATA
  42. IWbemClassObject *m_pObj;
  43. QUAL_MODE m_mode;
  44. BOOL m_bIsInstance; // Applies only to property qualifer mode.
  45. CPropInfo m_propInfo;
  46. CString m_strMethodName;
  47. // Overrides
  48. // ClassWizard generate virtual function overrides
  49. //{{AFX_VIRTUAL(CPropQualsPg)
  50. protected:
  51. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  52. //}}AFX_VIRTUAL
  53. // Implementation
  54. protected:
  55. enum PROP_TYPE
  56. {
  57. PROP_KEY,
  58. PROP_INDEXED,
  59. PROP_NOT_NULL,
  60. PROP_NORMAL
  61. };
  62. IWbemQualifierSet *m_pQuals;
  63. CQualList m_listQuals;
  64. //m_listQualsToDelete;
  65. PROP_TYPE m_type;
  66. void InitListCtrl();
  67. void LoadQuals();
  68. void UpdateButtons();
  69. CIMTYPE QualTypeToCIMTYPE(VARENUM vt);
  70. void AddQualifier(LPCTSTR szName, VARIANT *pVar, long lFlavor);
  71. int GetSelectedItem();
  72. LPCWSTR TypeToQual(PROP_TYPE type);
  73. HRESULT InitQualSet();
  74. BOOL IsInPropMode() { return m_mode == QMODE_PROP; }
  75. // Generated message map functions
  76. //{{AFX_MSG(CPropQualsPg)
  77. virtual BOOL OnInitDialog();
  78. afx_msg void OnAdd();
  79. afx_msg void OnEdit();
  80. afx_msg void OnDelete();
  81. afx_msg void OnDblclkQuals(NMHDR* pNMHDR, LRESULT* pResult);
  82. afx_msg void OnItemchangedQuals(NMHDR* pNMHDR, LRESULT* pResult);
  83. //}}AFX_MSG
  84. DECLARE_MESSAGE_MAP()
  85. };
  86. //{{AFX_INSERT_LOCATION}}
  87. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  88. #endif // !defined(AFX_PROPQUALSPG_H__42BE2BB5_536D_45D6_B307_4EEF803B35C9__INCLUDED_)