Commit d2085843 authored by Alex Korobka's avatar Alex Korobka Committed by Alexandre Julliard

Got rid of flickering scrollbar arrows. MDI scrolling speeded up a

bit.
parent c267e3ae
......@@ -22,7 +22,7 @@ typedef struct
extern LRESULT WINAPI ScrollBarWndProc( HWND32 hwnd, UINT32 uMsg,
WPARAM32 wParam, LPARAM lParam );
extern void SCROLL_DrawScrollBar( HWND32 hwnd, HDC32 hdc, INT32 nBar,
BOOL32 arrows );
BOOL32 arrows, BOOL32 interior );
extern void SCROLL_HandleScrollEvent( HWND32 hwnd, INT32 nBar,
UINT32 msg, POINT32 pt );
......
......@@ -32,7 +32,7 @@
static HBITMAP16 hBmpClose = 0;
static HBITMAP16 hBmpRestore = 0;
DWORD SCROLL_SetNCSbState(WND*,int,int,int,int,int,int);
INT32 SCROLL_SetNCSbState(WND*,int,int,int,int,int,int);
/* ----------------- declarations ----------------- */
static void MDI_UpdateFrameText(WND *, HWND32, BOOL32, LPCSTR);
......@@ -259,7 +259,7 @@ static LRESULT MDIRefreshMenu( HWND32 hwnd, HMENU32 hmenuFrame,
TRACE(mdi, "%04x %04x %04x\n",
hwnd, hmenuFrame, hmenuWindow);
FIXME(mdi,"partial function stub\n");
FIXME(mdi,"partially function stub");
return oldFrameMenu;
}
......@@ -1598,6 +1598,7 @@ BOOL16 WINAPI TranslateMDISysAccel16( HWND16 hwndClient, LPMSG16 msg )
*/
void WINAPI CalcChildScroll( HWND16 hwnd, WORD scroll )
{
SCROLLINFO info;
RECT32 childRect, clientRect;
INT32 vmin, vmax, hmin, hmax, vpos, hpos;
WND *pWnd, *Wnd;
......@@ -1617,9 +1618,6 @@ void WINAPI CalcChildScroll( HWND16 hwnd, WORD scroll )
}
UnionRect32( &childRect, &clientRect, &childRect );
/* jump through the hoops to prevent excessive flashing
*/
hmin = childRect.left; hmax = childRect.right - clientRect.right;
hpos = clientRect.left - childRect.left;
vmin = childRect.top; vmax = childRect.bottom - clientRect.bottom;
......@@ -1630,14 +1628,14 @@ void WINAPI CalcChildScroll( HWND16 hwnd, WORD scroll )
case SB_HORZ:
vpos = hpos; vmin = hmin; vmax = hmax;
case SB_VERT:
SetScrollPos32(hwnd, scroll, vpos, FALSE);
SetScrollRange32(hwnd, scroll, vmin, vmax, TRUE);
info.cbSize = sizeof(info);
info.nMax = vmax; info.nMin = vmin; info.nPos = vpos;
info.fMask = SIF_POS | SIF_RANGE;
SetScrollInfo32(hwnd, scroll, &info, TRUE);
break;
case SB_BOTH:
SCROLL_SetNCSbState( Wnd, vmin, vmax, vpos,
hmin, hmax, hpos);
SetWindowPos32(hwnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE
| SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED );
}
}
......
......@@ -1559,9 +1559,9 @@ void NC_DoNCPaint( WND* wndPtr, HRGN32 clip, BOOL32 suppress_menupaint )
/* Draw the scroll-bars */
if (wndPtr->dwStyle & WS_VSCROLL)
SCROLL_DrawScrollBar( hwnd, hdc, SB_VERT, TRUE );
SCROLL_DrawScrollBar( hwnd, hdc, SB_VERT, TRUE, TRUE );
if (wndPtr->dwStyle & WS_HSCROLL)
SCROLL_DrawScrollBar( hwnd, hdc, SB_HORZ, TRUE );
SCROLL_DrawScrollBar( hwnd, hdc, SB_HORZ, TRUE, TRUE );
/* Draw the "size-box" */
......@@ -1689,9 +1689,9 @@ void NC_DoNCPaint95(
/* Draw the scroll-bars */
if (wndPtr->dwStyle & WS_VSCROLL)
SCROLL_DrawScrollBar( hwnd, hdc, SB_VERT, TRUE );
SCROLL_DrawScrollBar( hwnd, hdc, SB_VERT, TRUE, TRUE );
if (wndPtr->dwStyle & WS_HSCROLL)
SCROLL_DrawScrollBar( hwnd, hdc, SB_HORZ, TRUE );
SCROLL_DrawScrollBar( hwnd, hdc, SB_HORZ, TRUE, TRUE );
/* Draw the "size-box" */
if ((wndPtr->dwStyle & WS_VSCROLL) && (wndPtr->dwStyle & WS_HSCROLL))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment