diff options
author | George Hazan <george.hazan@gmail.com> | 2015-01-11 16:12:50 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-01-11 16:12:50 +0000 |
commit | a8e0f6b67fdfb0e8fcc7fe0394e78198501025bc (patch) | |
tree | 24812d47ef1cd9ad6c9daaaeaa7ee1f416961e73 /plugins/TabSRMM/src/msgs.h | |
parent | 5bbe7b48a9737806fa88c060b47de237ae9368cd (diff) |
correct implementation of IRichEditOleCallback for tabSRMM
git-svn-id: http://svn.miranda-ng.org/main/trunk@11829 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/msgs.h')
-rw-r--r-- | plugins/TabSRMM/src/msgs.h | 70 |
1 files changed, 24 insertions, 46 deletions
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index d510046ba1..a4db3ef8b4 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -602,54 +602,32 @@ struct TNewWindowData * this class has to implement the GetNewStorage() method
*/
-class REOLECallback : IRichEditOleCallback
+struct CREOleCallback : public IRichEditOleCallback
{
+ CREOleCallback() : refCount(0) {}
+ unsigned refCount;
+ IStorage *pictStg;
+ int nextStgId;
+
+ STDMETHOD(QueryInterface)(REFIID riid, LPVOID FAR *lplpObj);
+ STDMETHOD_(ULONG, AddRef)(THIS);
+ STDMETHOD_(ULONG, Release)(THIS);
+
+ STDMETHOD(ContextSensitiveHelp) (BOOL fEnterMode);
+ STDMETHOD(GetNewStorage) (LPSTORAGE FAR *lplpstg);
+ STDMETHOD(GetInPlaceContext) (LPOLEINPLACEFRAME FAR *lplpFrame, LPOLEINPLACEUIWINDOW FAR *lplpDoc, LPOLEINPLACEFRAMEINFO lpFrameInfo);
+ STDMETHOD(ShowContainerUI) (BOOL fShow);
+ STDMETHOD(QueryInsertObject) (LPCLSID lpclsid, LPSTORAGE lpstg, LONG cp);
+ STDMETHOD(DeleteObject) (LPOLEOBJECT lpoleobj);
+ STDMETHOD(QueryAcceptData) (LPDATAOBJECT lpdataobj, CLIPFORMAT FAR *lpcfFormat, DWORD reco, BOOL fReally, HGLOBAL hMetaPict);
+ STDMETHOD(GetClipboardData) (CHARRANGE FAR *lpchrg, DWORD reco, LPDATAOBJECT FAR *lplpdataobj);
+ STDMETHOD(GetDragDropEffect) (BOOL fDrag, DWORD grfKeyState, LPDWORD pdwEffect);
+ STDMETHOD(GetContextMenu) (WORD seltype, LPOLEOBJECT lpoleobj, CHARRANGE FAR *lpchrg, HMENU FAR *lphmenu);
+};
-public:
-
- REOLECallback()
- {
- mRefCounter = 0;
- }
-
- ~REOLECallback()
- {}
-
- STDMETHOD_(ULONG, AddRef)(void)
- {
- mRefCounter++;
- return (mRefCounter);
- }
-
- STDMETHOD_(ULONG, Release)(void)
- {
- --mRefCounter;
- //if (--mRefCounter == 0)
- // delete this;
- return (mRefCounter);
- }
-
- STDMETHOD(QueryInterface)(REFIID iid, void** ppvObject)
- {
- if ( iid == IID_IUnknown || iid == IID_IRichEditOleCallback ) {
- *ppvObject = this; AddRef(); return (S_OK);
- }
- else
- return (E_NOINTERFACE);
- }
-
- STDMETHOD(ContextSensitiveHelp) (BOOL) { return (E_NOTIMPL); }
- STDMETHOD(DeleteObject) (LPOLEOBJECT) { return (E_NOTIMPL); }
- STDMETHOD(GetClipboardData) (CHARRANGE*, DWORD, LPDATAOBJECT*) { return (E_NOTIMPL); }
- STDMETHOD(GetContextMenu) (WORD, LPOLEOBJECT, CHARRANGE*, HMENU*) { return (E_NOTIMPL); }
- STDMETHOD(GetDragDropEffect) (BOOL, DWORD, LPDWORD) { return (E_NOTIMPL); }
- STDMETHOD(GetInPlaceContext) (LPOLEINPLACEFRAME*, LPOLEINPLACEUIWINDOW*, LPOLEINPLACEFRAMEINFO) { return (E_NOTIMPL); }
- STDMETHOD(GetNewStorage) (LPSTORAGE*);
- STDMETHOD(QueryAcceptData) (LPDATAOBJECT, CLIPFORMAT*, DWORD, BOOL, HGLOBAL) { return (E_NOTIMPL); }
- STDMETHOD(QueryInsertObject) (LPCLSID, LPSTORAGE, LONG) { return (S_OK); }
- STDMETHOD(ShowContainerUI) (BOOL) { return (E_NOTIMPL); }
-private:
- UINT mRefCounter;
+struct CREOleCallback2 : public CREOleCallback
+{
+ STDMETHOD(QueryAcceptData) (LPDATAOBJECT lpdataobj, CLIPFORMAT FAR *lpcfFormat, DWORD reco, BOOL fReally, HGLOBAL hMetaPict);
};
#define MSGFONTID_MYMSG 0
|