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.

156 lines
3.6 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. /*++
  3. Copyright (C) Microsoft Corporation, 1997 - 1998
  4. Module Name:
  5. PgIASAdv.h
  6. Abstract:
  7. Header file for the CPgIASAdv class.
  8. See PgIASAdv.cpp for implementation.
  9. Revision History:
  10. byao - created
  11. mmaguire 06/01/98 - revamped
  12. --*/
  13. //////////////////////////////////////////////////////////////////////////////
  14. #if !defined(_IAS_ADVANCED_PAGE_H_)
  15. #define _IAS_ADVANCED_PAGE_H_
  16. //////////////////////////////////////////////////////////////////////////////
  17. // BEGIN INCLUDES
  18. //
  19. // where we can find what this class derives from:
  20. //
  21. #include "helper.h"
  22. //
  23. //
  24. // where we can find what this class has or uses:
  25. //
  26. #include <vector>
  27. #include "napmmc.h"
  28. #include "IASProfA.h"
  29. //
  30. // END INCLUDES
  31. //////////////////////////////////////////////////////////////////////////////
  32. #define ATTRIBUTE_NAME_COLUMN_WIDTH 140
  33. #define ATTRIBUTE_VENDOR_COLUMN_WIDTH 100
  34. #define ATTRIBUTE_VALUE_COLUMN_WIDTH 400
  35. #define ATTRIBUTE_DESCRIPTION_COLUMN_WIDTH 400
  36. /////////////////////////////////////////////////////////////////////////////
  37. // CPgIASAdv dialog
  38. class CPgIASAdv : public CManagedPage
  39. {
  40. DECLARE_DYNCREATE(CPgIASAdv)
  41. // Construction
  42. public:
  43. CPgIASAdv(ISdo* pIProfile = NULL, ISdoDictionaryOld* pIDictionary = NULL);
  44. ~CPgIASAdv();
  45. HRESULT InitProfAttrList();
  46. STDMETHOD(AddAttributeToProfile)(int nIndex);
  47. void SetData(LONG lFilter, void* pvData)
  48. {
  49. m_lAttrFilter = lFilter;
  50. try {
  51. m_pvecAllAttributeInfos = ( std::vector< CComPtr<IIASAttributeInfo> > * ) pvData;
  52. }
  53. catch (...)
  54. {
  55. m_pvecAllAttributeInfos = NULL;
  56. }
  57. };
  58. // Dialog Data
  59. //{{AFX_DATA(CPgIASAdv)
  60. enum { IDD = IDD_IAS_ADVANCED_TAB };
  61. CListCtrl m_listProfileAttributes;
  62. //}}AFX_DATA
  63. // Overrides
  64. // ClassWizard generate virtual function overrides
  65. //{{AFX_VIRTUAL(CPgIASAdv)
  66. public:
  67. virtual BOOL OnApply();
  68. protected:
  69. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  70. //}}AFX_VIRTUAL
  71. // Implementation
  72. protected:
  73. HRESULT UpdateProfAttrListCtrl();
  74. STDMETHOD(EditProfileItemInList)( int iIndex );
  75. HRESULT UpdateProfAttrListItem(int nItem);
  76. void UpdateButtonState();
  77. HRESULT InsertProfileAttributeListItem(int nItem);
  78. STDMETHOD(InternalAddAttributeToProfile)(int nIndex);
  79. //
  80. // protected member variables
  81. //
  82. CComPtr<ISdo> m_spProfileSdo;
  83. CComPtr<ISdoDictionaryOld> m_spDictionarySdo;
  84. CComPtr<ISdoCollection> m_spProfileAttributeCollectionSdo;
  85. // pointer to the all array list
  86. std::vector< CComPtr<IIASAttributeInfo> > * m_pvecAllAttributeInfos;
  87. std::vector< CIASProfileAttribute* > m_vecProfileAttributes;
  88. // list of existing profile SDOs -- we need to delete exising ones first
  89. // before saving the new ones
  90. std::vector< ISdo* > m_vecProfileSdos;
  91. LONG m_lAttrFilter;
  92. // Generated message map functions
  93. //{{AFX_MSG(CPgIASAdv)
  94. virtual BOOL OnInitDialog();
  95. afx_msg void OnButtonIasAttributeAdd();
  96. afx_msg void OnButtonIasAttributeRemove();
  97. afx_msg void OnButtonIasAttributeEdit();
  98. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  99. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  100. afx_msg void OnDblclkListIasProfattrs(NMHDR* pNMHDR, LRESULT* pResult);
  101. afx_msg void OnItemChangedListIasProfileAttributes(NMHDR* pNMHDR, LRESULT* pResult);
  102. afx_msg void OnKeydownIasListAttributesInProfile(NMHDR* pNMHDR, LRESULT* pResult);
  103. //}}AFX_MSG
  104. DECLARE_MESSAGE_MAP()
  105. private:
  106. BOOL m_fAllAttrInitialized; // has the attribute list been initialized?
  107. };
  108. //{{AFX_INSERT_LOCATION}}
  109. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  110. #endif // _IAS_ADVANCED_PAGE_H_