richedit: Show arrow cursor over scrollbar.
This commit is contained in:
parent
936191887e
commit
1d21d24a51
|
@ -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)))
|
||||
|
|
Loading…
Reference in New Issue