Check for SB_CTL before displaying a caret.

This commit is contained in:
Francois Gouget 2000-11-01 01:52:37 +00:00 committed by Alexandre Julliard
parent 50e8ea387b
commit e3810e3acc
1 changed files with 13 additions and 15 deletions

View File

@ -816,7 +816,8 @@ void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, INT nBar,
(SCROLL_TrackingBar == nBar))
SCROLL_DrawMovingThumb( hdc, &rect, vertical, arrowSize, thumbSize );
if(hwnd==GetFocus()) /* if scroll bar has focus, reposition the caret*/
/* if scroll bar has focus, reposition the caret*/
if(hwnd==GetFocus() && (nBar==SB_CTL))
{
if (!vertical)
{
@ -1174,8 +1175,6 @@ LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam,
/* Create a caret when a ScrollBar get focus*/
RECT rect;
int arrowSize, thumbSize, thumbPos, vertical;
if(hwnd==GetFocus())
{
vertical = SCROLL_GetScrollBarRect( hwnd, SB_CTL, &rect,
&arrowSize, &thumbSize, &thumbPos );
if (!vertical)
@ -1190,7 +1189,6 @@ LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam,
}
ShowCaret(hwnd);
}
}
break;
case WM_KILLFOCUS: