Commit 58b29953 authored by Kevin Koltzau's avatar Kevin Koltzau Committed by Alexandre Julliard

riched20: Store reference to editor in ole interface.

parent c0cd38fb
......@@ -2236,7 +2236,7 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
{
LPVOID *ppvObj = (LPVOID*) lParam;
FIXME("EM_GETOLEINTERFACE %p: stub\n", ppvObj);
return CreateIRichEditOle(ppvObj);
return CreateIRichEditOle(editor, ppvObj);
}
case EM_SETOLECALLBACK:
if(editor->lpOleCallback)
......
......@@ -233,7 +233,7 @@ void ME_QueueInvalidateFromCursor(ME_TextEditor *editor, int nCursor);
BOOL ME_SetZoom(ME_TextEditor *editor, int numerator, int denominator);
/* richole.c */
extern LRESULT CreateIRichEditOle(LPVOID *);
extern LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *);
/* wintest.c */
......
......@@ -31,6 +31,7 @@
#include "winuser.h"
#include "ole2.h"
#include "richole.h"
#include "editor.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(richedit);
......@@ -38,6 +39,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(richedit);
typedef struct IRichEditOleImpl {
const IRichEditOleVtbl *lpVtbl;
LONG ref;
ME_TextEditor *editor;
} IRichEditOleImpl;
/* there is no way to be consistent across different sets of headers - mingw, Wine, Win32 SDK*/
......@@ -250,7 +253,7 @@ static const IRichEditOleVtbl revt = {
IRichEditOle_fnImportDataObject
};
LRESULT CreateIRichEditOle(LPVOID *ppObj)
LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj)
{
IRichEditOleImpl *reo;
......@@ -260,6 +263,7 @@ LRESULT CreateIRichEditOle(LPVOID *ppObj)
reo->lpVtbl = &revt;
reo->ref = 1;
reo->editor = editor;
TRACE("Created %p\n",reo);
*ppObj = (LPVOID) reo;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment