Fixing WM_ENABLE ScrollBarWndProc. Tested it with 7-Zip, AbiWord, RegEdit and Winefile, all seem not to use it. Please test this.

svn path=/trunk/; revision=16571
This commit is contained in:
James Tabor 2005-07-15 01:42:22 +00:00
parent a8f77a38bd
commit 3c13baae03
2 changed files with 20 additions and 9 deletions

View file

@ -1263,18 +1263,25 @@ ScrollBarWndProc(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
IntScrollCreateScrollBar(Wnd, (LPCREATESTRUCTW) lParam);
break;
#if 0 /* FIXME */
//#if 0 /* FIXME */
case WM_ENABLE:
{
SCROLLBAR_INFO *infoPtr;
if ((infoPtr = SCROLL_GetScrollBarInfo( hwnd, SB_CTL )))
{
infoPtr->flags = wParam ? ESB_ENABLE_BOTH : ESB_DISABLE_BOTH;
SCROLL_RefreshScrollBar(hwnd, SB_CTL, TRUE, TRUE);
}
// SCROLLBAR_INFO *infoPtr;
// if ((infoPtr = SCROLL_GetScrollBarInfo( hwnd, SB_CTL )))
// {
// infoPtr->flags = wParam ? ESB_ENABLE_BOTH : ESB_DISABLE_BOTH;
// SCROLL_RefreshScrollBar(hwnd, SB_CTL, TRUE, TRUE);
// }
DbgPrint("ScrollBarWndProc WM_ENABLE\n");
NtUserEnableScrollBar(Wnd,SB_CTL,wParam);
/* Refresh Scrollbars. */
HDC hdc = GetDCEx( Wnd, 0, DCX_CACHE | SB_CTL );
if (!hdc) return 1;
IntDrawScrollBar( Wnd, hdc, SB_CTL);
ReleaseDC( Wnd, hdc );
}
return 0;
#endif
//#endif
case WM_LBUTTONDBLCLK:
case WM_LBUTTONDOWN:

View file

@ -642,8 +642,12 @@ NtUserEnableScrollBar(
if(wSBflags == SB_CTL)
{
/* FIXME */
DPRINT1("Enable Scrollbar SB_CTL\n");
InfoV = IntGetScrollbarInfoFromWindow(Window, SB_VERT);
Chg = IntEnableScrollBar(FALSE, InfoV ,wArrows);
/* Chg? Scrollbar is Refresh in user32/controls/scrollbar.c. */
IntReleaseWindowObject(Window);
return FALSE;
return TRUE;
}
if(wSBflags != SB_BOTH && !SBID_IS_VALID(wSBflags))