From 7ebe1aec24dd21bf3afb3e993ecb05d947f966b5 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Wed, 24 Mar 2021 09:08:31 +0000 Subject: [PATCH] riched20: Use TxDraw() to implement the host's WM_PAINT handler. Signed-off-by: Huw Davies Signed-off-by: Alexandre Julliard --- dlls/riched20/editor.h | 2 +- dlls/riched20/txthost.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index 075fe534783..929e10a3179 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -390,7 +390,7 @@ extern const struct ITextServicesVtbl text_services_stdcall_vtbl DECLSPEC_HIDDEN #define TXTSERV_VTABLE(This) (This)->lpVtbl #endif #define ITextServices_TxSendMessage(This,a,b,c,d) TXTSERV_VTABLE(This)->TxSendMessage(This,a,b,c,d) -#define ITextServices_TxDraw(This,a,b,c,d,e,f,g,h,i,j,k,l) TXTSERV_VTABLE(This)->ITextServices_TxDraw(This,a,b,c,d,e,f,g,h,i,j,k,l) +#define ITextServices_TxDraw(This,a,b,c,d,e,f,g,h,i,j,k,l) TXTSERV_VTABLE(This)->TxDraw(This,a,b,c,d,e,f,g,h,i,j,k,l) #define ITextServices_TxGetHScroll(This,a,b,c,d,e) TXTSERV_VTABLE(This)->TxGetHScroll(This,a,b,c,d,e) #define ITextServices_TxGetVScroll(This,a,b,c,d,e) TXTSERV_VTABLE(This)->TxGetVScroll(This,a,b,c,d,e) #define ITextServices_OnTxSetCursor(This,a,b,c,d,e,f,g,h,i) TXTSERV_VTABLE(This)->OnTxSetCursor(This,a,b,c,d,e,f,g,h,i) diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c index 1fd989d5ed4..2c832db6a76 100644 --- a/dlls/riched20/txthost.c +++ b/dlls/riched20/txthost.c @@ -1219,7 +1219,8 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam, ps.rcPaint.right = editor->rcFormat.right; } - editor_draw( editor, hdc, &ps.rcPaint ); + ITextServices_TxDraw( host->text_srv, DVASPECT_CONTENT, 0, NULL, NULL, hdc, NULL, NULL, NULL, + &ps.rcPaint, NULL, 0, TXTVIEW_ACTIVE ); DeleteObject( SelectObject( hdc, brush ) ); EndPaint( editor->hWnd, &ps ); return 0;