From 8ab0570d0247de4e24596cf2dea5962e51139cf2 Mon Sep 17 00:00:00 2001 From: Dylan Smith Date: Mon, 15 Dec 2008 04:31:25 -0500 Subject: [PATCH] richedit: Removed an unnecessary call to GetScrollInfo. The vertical scrollbar state is stored internally within the control, so should be used when possible. This will become more necessary when windowless richedit controls are implemented, and there will no hWnd to pass to GetScrollInfo. --- dlls/riched20/editor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 0d3010a6e2..16f27719d4 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -3545,9 +3545,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, pt.x += editor->selofs; pt.x++; /* for some reason native offsets x by one */ - si.cbSize = sizeof(si); - si.fMask = SIF_POS; - if (GetScrollInfo(editor->hWnd, SB_VERT, &si)) pt.y -= si.nPos; + pt.y -= editor->vert_si.nPos; si.cbSize = sizeof(si); si.fMask = SIF_POS; if (GetScrollInfo(editor->hWnd, SB_HORZ, &si)) pt.x -= si.nPos;