Dylan Smith : richedit: Show arrow cursor over scrollbar.
Alexandre Julliard
julliard at winehq.org
Mon Oct 6 09:35:15 CDT 2008
Module: wine
Branch: master
Commit: 1d21d24a51f6cf7652f63b436f544fceb217fa2e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1d21d24a51f6cf7652f63b436f544fceb217fa2e
Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date: Mon Oct 6 04:28:37 2008 -0400
richedit: Show arrow cursor over scrollbar.
---
dlls/riched20/editor.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 608be01..f78e515 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -2103,10 +2103,29 @@ static BOOL ME_SetCursor(ME_TextEditor *editor)
POINT pt;
BOOL isExact;
int offset;
+ SCROLLBARINFO sbi;
DWORD messagePos = GetMessagePos();
pt.x = (short)LOWORD(messagePos);
pt.y = (short)HIWORD(messagePos);
+
+ sbi.cbSize = sizeof(sbi);
+ GetScrollBarInfo(editor->hWnd, OBJID_HSCROLL, &sbi);
+ if (!(sbi.rgstate[0] & (STATE_SYSTEM_INVISIBLE|STATE_SYSTEM_OFFSCREEN)) &&
+ PtInRect(&sbi.rcScrollBar, pt))
+ {
+ SetCursor(LoadCursorW(NULL, (WCHAR*)IDC_ARROW));
+ return TRUE;
+ }
+ sbi.cbSize = sizeof(sbi);
+ GetScrollBarInfo(editor->hWnd, OBJID_VSCROLL, &sbi);
+ if (!(sbi.rgstate[0] & (STATE_SYSTEM_INVISIBLE|STATE_SYSTEM_OFFSCREEN)) &&
+ PtInRect(&sbi.rcScrollBar, pt))
+ {
+ SetCursor(LoadCursorW(NULL, (WCHAR*)IDC_ARROW));
+ return TRUE;
+ }
ScreenToClient(editor->hWnd, &pt);
+
if ((GetWindowLongW(editor->hWnd, GWL_STYLE) & ES_SELECTIONBAR) &&
(pt.x < editor->selofs ||
(editor->nSelectionType == stLine && GetCapture() == editor->hWnd)))
More information about the wine-cvs
mailing list