#pragma once #include "SettingsPropertyPage.h" class CProjectLDSettingsWrapper; typedef CSettingsPropertyPage CLDPropertyPage; class ATL_NO_VTABLE CProjectLDSettingsWrapper : public IPerPropertyBrowsing, public IVsPerPropertyBrowsing, public IPropertyContainer, public IDispatchImpl, public CComObjectRoot { // ========================================================================= // construct, init, destruct public: static HRESULT CreateInstance(CLDPropertyPage *pPage, IUnknown *pUnkParent, IUnknown **pIUnkPropPage); protected: CProjectLDSettingsWrapper(); HRESULT Init(CLDPropertyPage *pPage, IUnknown *pUnkParent, IUnknown **pIUnkPropPage); ~CProjectLDSettingsWrapper(); // construct, init, destruct // ========================================================================= public: BEGIN_COM_MAP(CProjectLDSettingsWrapper) COM_INTERFACE_ENTRY(IPerPropertyBrowsing) COM_INTERFACE_ENTRY(IVsPerPropertyBrowsing) COM_INTERFACE_ENTRY(IPropertyContainer) COM_INTERFACE_ENTRY(IDispatch) COM_INTERFACE_ENTRY(IProjectLDSettings) END_COM_MAP() // ========================================================================= // IPerPropertyBrowsing // Used to populate Debug Start Mode list box public: STDMETHOD(GetDisplayString)( /* [in] */ DISPID dispID, /* [out] */ BSTR *pBstr); STDMETHOD(MapPropertyToPage)( /* [in] */ DISPID dispID, /* [out] */ CLSID *pClsid); STDMETHOD(GetPredefinedStrings)( /* [in] */ DISPID dispID, /* [out] */ CALPOLESTR * pCaStringsOut, /* [out] */ CADWORD * pCaCookiesOut); STDMETHOD(GetPredefinedValue)( /* [in] */ DISPID dispID, /* [in] */ DWORD dwCookie, /* [out] */ VARIANT *pVarOut); // IPerPropertyBrowsing // ========================================================================= // ========================================================================= // IVsPerPropertyBrowsing // To provide localized info displayed iin the property browser public : STDMETHOD(HideProperty)(DISPID dispid, BOOL* pfHide); STDMETHOD(DisplayChildProperties)(DISPID dispid, BOOL* pfDisplay); STDMETHOD(GetLocalizedPropertyInfo)( DISPID dispid, LCID localeID, BSTR* pbstrLocalizedName, BSTR* pbstrLocalizedDescription); STDMETHOD(HasDefaultValue)(DISPID dispid, BOOL* fDefault); STDMETHOD(IsPropertyReadOnly)(DISPID dispid, BOOL* pfReadOnly); STDMETHOD(GetClassName)(BSTR*); STDMETHOD(CanResetPropertyValue)(DISPID , BOOL* ); STDMETHOD(ResetPropertyValue)(DISPID ); // IVsPerPropertyBrowsing // ========================================================================= STDMETHOD(get_Options)(BSTR *pValue); STDMETHOD(put_Options)(BSTR Value); STDMETHOD(get_Libraries)(BSTR *pValue); STDMETHOD(put_Libraries)(BSTR Value); STDMETHOD(get_LibraryDirectories)(BSTR *pValue); STDMETHOD(put_LibraryDirectories)(BSTR Value); STDMETHOD(Commit)(); public: CLDPropertyPage *m_pPage; CComPtr m_srpIProjectLDSettings; CComBSTR m_cbstrOptions; CComBSTR m_cbstrLibraries; CComBSTR m_cbstrLibraryDirectories; };