From 7f84cc48f3c6b12cc64416a28e35577e3db405df Mon Sep 17 00:00:00 2001 From: Kevin Koltzau Date: Wed, 1 Feb 2006 13:05:40 +0100 Subject: [PATCH] riched20: Implement EM_SETOLECALLBACK. --- dlls/riched20/editor.c | 13 ++++++++++--- dlls/riched20/editstr.h | 4 ++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 19c7b3fd968..9b741a852a1 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -223,8 +223,6 @@ #include "editor.h" #include "commdlg.h" -#include "ole2.h" -#include "richole.h" #include "winreg.h" #define NO_SHLWAPI_STREAM #include "shlwapi.h" @@ -889,6 +887,7 @@ ME_TextEditor *ME_MakeEditor(HWND hWnd) { ed->bRedraw = TRUE; ed->nInvalidOfs = -1; ed->pfnWordBreak = NULL; + ed->lpOleCallback = NULL; GetClientRect(hWnd, &ed->rcFormat); for (i=0; ipFontCache[i].hFont); } DeleteObject(editor->hbrBackground); + if(editor->lpOleCallback) + IUnknown_Release(editor->lpOleCallback); FREE_OBJ(editor); } @@ -1206,7 +1207,6 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP UNSUPPORTED_MSG(EM_SETEDITSTYLE) UNSUPPORTED_MSG(EM_SETFONTSIZE) UNSUPPORTED_MSG(EM_SETLANGOPTIONS) - UNSUPPORTED_MSG(EM_SETOLECALLBACK) UNSUPPORTED_MSG(EM_SETOPTIONS) UNSUPPORTED_MSG(EM_SETPALETTE) UNSUPPORTED_MSG(EM_SETPASSWORDCHAR) @@ -2043,6 +2043,13 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP FIXME("EM_GETOLEINTERFACE %p: stub\n", ppvObj); return CreateIRichEditOle(ppvObj); } + case EM_SETOLECALLBACK: + if(editor->lpOleCallback) + IUnknown_Release(editor->lpOleCallback); + editor->lpOleCallback = (LPRICHEDITOLECALLBACK)lParam; + if(editor->lpOleCallback) + IUnknown_AddRef(editor->lpOleCallback); + return TRUE; case EM_GETWORDBREAKPROC: return (LRESULT)editor->pfnWordBreak; case EM_SETWORDBREAKPROC: diff --git a/dlls/riched20/editstr.h b/dlls/riched20/editstr.h index 919dd029dc0..d27eab98b04 100644 --- a/dlls/riched20/editstr.h +++ b/dlls/riched20/editstr.h @@ -38,6 +38,9 @@ #include #include #include +#define COBJMACROS +#include +#include #include "wine/debug.h" @@ -289,6 +292,7 @@ typedef struct tagME_TextEditor BOOL bRedraw; int nInvalidOfs; EDITWORDBREAKPROCW pfnWordBreak; + LPRICHEDITOLECALLBACK lpOleCallback; } ME_TextEditor; typedef struct tagME_Context