Fixing WM_ENABLE ScrollBarWndProc. Tested it with 7-Zip, AbiWord,
RegEdit and Winefile, all seem not to use it. Please test this.
Modified: trunk/reactos/lib/user32/controls/scrollbar.c
Modified: trunk/reactos/subsys/win32k/ntuser/scrollbar.c
_____
Modified: trunk/reactos/lib/user32/controls/scrollbar.c
--- trunk/reactos/lib/user32/controls/scrollbar.c 2005-07-14
23:11:28 UTC (rev 16570)
+++ trunk/reactos/lib/user32/controls/scrollbar.c 2005-07-15
01:42:22 UTC (rev 16571)
@@ -1263,18 +1263,25 @@
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:
_____
Modified: trunk/reactos/subsys/win32k/ntuser/scrollbar.c
--- trunk/reactos/subsys/win32k/ntuser/scrollbar.c 2005-07-14
23:11:28 UTC (rev 16570)
+++ trunk/reactos/subsys/win32k/ntuser/scrollbar.c 2005-07-15
01:42:22 UTC (rev 16571)
@@ -642,8 +642,12 @@
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))
Show replies by date