Move Ole item container stuff into separate class

This commit is contained in:
locka%iol.ie 1999-05-27 21:20:00 +00:00
parent 23ff4249a7
commit ea75035ea9
2 changed files with 5 additions and 84 deletions

View File

@ -573,70 +573,6 @@ HRESULT STDMETHODCALLTYPE CControlSite::OnPosRectChange(/* [in] */ LPCRECT lprcP
}
///////////////////////////////////////////////////////////////////////////////
// IParseDisplayName implementation
HRESULT STDMETHODCALLTYPE CControlSite::ParseDisplayName(/* [unique][in] */ IBindCtx __RPC_FAR *pbc, /* [in] */ LPOLESTR pszDisplayName, /* [out] */ ULONG __RPC_FAR *pchEaten, /* [out] */ IMoniker __RPC_FAR *__RPC_FAR *ppmkOut)
{
// TODO
return E_NOTIMPL;
}
///////////////////////////////////////////////////////////////////////////////
// IOleContainer implementation
HRESULT STDMETHODCALLTYPE CControlSite::EnumObjects(/* [in] */ DWORD grfFlags, /* [out] */ IEnumUnknown __RPC_FAR *__RPC_FAR *ppenum)
{
// TODO
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE CControlSite::LockContainer(/* [in] */ BOOL fLock)
{
// TODO
return E_NOTIMPL;
}
///////////////////////////////////////////////////////////////////////////////
// IOleItemContainer implementation
HRESULT STDMETHODCALLTYPE CControlSite::GetObject(/* [in] */ LPOLESTR pszItem, /* [in] */ DWORD dwSpeedNeeded, /* [unique][in] */ IBindCtx __RPC_FAR *pbc, /* [in] */ REFIID riid, /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject)
{
if (pszItem == NULL)
{
return E_INVALIDARG;
}
if (ppvObject == NULL)
{
return E_INVALIDARG;
}
*ppvObject = NULL;
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE CControlSite::GetObjectStorage(/* [in] */ LPOLESTR pszItem, /* [unique][in] */ IBindCtx __RPC_FAR *pbc, /* [in] */ REFIID riid, /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvStorage)
{
// TODO
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE CControlSite::IsRunning(/* [in] */ LPOLESTR pszItem)
{
// TODO
return E_NOTIMPL;
}
///////////////////////////////////////////////////////////////////////////////
// IOleInPlaceSiteEx implementation

View File

@ -15,15 +15,14 @@
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef CACTIVESITE_H
#define CACTIVESITE_H
#ifndef CONTROLSITE_H
#define CONTROLSITE_H
class CControlSite : public CComObjectRootEx<CComSingleThreadModel>,
public IOleClientSite,
public IOleInPlaceSiteWindowless,
public IOleControlSite,
public IAdviseSinkEx,
public IOleItemContainer,
public IDispatch
{
// Handle to parent window
@ -63,8 +62,6 @@ class CControlSite : public CComObjectRootEx<CComSingleThreadModel>,
CLSID m_clsid;
// Parameter list
PropertyList m_ParameterList;
// List of controls
static std::list<CControlSite *> m_cControlList;
// Double buffer drawing variables used for windowless controls
@ -113,11 +110,11 @@ BEGIN_COM_MAP(CControlSite)
COM_INTERFACE_ENTRY_IID(IID_IAdviseSink, IAdviseSinkEx)
COM_INTERFACE_ENTRY_IID(IID_IAdviseSink2, IAdviseSinkEx)
COM_INTERFACE_ENTRY_IID(IID_IAdviseSinkEx, IAdviseSinkEx)
COM_INTERFACE_ENTRY_IID(IID_IParseDisplayName, IOleItemContainer)
COM_INTERFACE_ENTRY_IID(IID_IOleContainer, IOleItemContainer)
COM_INTERFACE_ENTRY_IID(IID_IOleItemContainer, IOleItemContainer)
END_COM_MAP()
// List of controls
static std::list<CControlSite *> m_cControlList;
virtual HRESULT Create(REFCLSID clsid, PropertyList &pl, const tstring szName = _T(""));
virtual HRESULT Attach(HWND hwndParent, const RECT &rcPos, IUnknown *pInitStream);
virtual HRESULT Detach();
@ -223,18 +220,6 @@ END_COM_MAP()
virtual HRESULT STDMETHODCALLTYPE TranslateAccelerator(/* [in] */ MSG __RPC_FAR *pMsg, /* [in] */ DWORD grfModifiers);
virtual HRESULT STDMETHODCALLTYPE OnFocus(/* [in] */ BOOL fGotFocus);
virtual HRESULT STDMETHODCALLTYPE ShowPropertyFrame( void);
// IParseDisplayName implementation
virtual HRESULT STDMETHODCALLTYPE ParseDisplayName(/* [unique][in] */ IBindCtx __RPC_FAR *pbc, /* [in] */ LPOLESTR pszDisplayName, /* [out] */ ULONG __RPC_FAR *pchEaten, /* [out] */ IMoniker __RPC_FAR *__RPC_FAR *ppmkOut);
// IOleContainer implementation
virtual HRESULT STDMETHODCALLTYPE EnumObjects(/* [in] */ DWORD grfFlags, /* [out] */ IEnumUnknown __RPC_FAR *__RPC_FAR *ppenum);
virtual HRESULT STDMETHODCALLTYPE LockContainer(/* [in] */ BOOL fLock);
// IOleItemContainer implementation
virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetObject(/* [in] */ LPOLESTR pszItem, /* [in] */ DWORD dwSpeedNeeded, /* [unique][in] */ IBindCtx __RPC_FAR *pbc, /* [in] */ REFIID riid, /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetObjectStorage(/* [in] */ LPOLESTR pszItem, /* [unique][in] */ IBindCtx __RPC_FAR *pbc, /* [in] */ REFIID riid, /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvStorage);
virtual HRESULT STDMETHODCALLTYPE IsRunning(/* [in] */ LPOLESTR pszItem);
};
typedef CComObject<CControlSite> CControlSiteInstance;