Reduces the coupling between control and windows code by removing the need for NC_TrackScrollBar. Change log: nonclient.c - remove reference to NC_TrackScrollBar Licence: X11 The patch was deleveloped without CVS access use patch -P1 from within the top level wine directory to apply Andrew --- wine-20020804/windows/mdi.c Sat Jun 1 07:06:54 2002 +++ wine/windows/mdi.c Sun Aug 11 00:50:08 2002 @@ -1932,7 +1932,6 @@ { SCROLLINFO info; RECT childRect, clientRect; - INT vmin, vmax, hmin, hmax, vpos, hpos; HWND *list; GetClientRect( hwnd, &clientRect ); @@ -1961,27 +1960,28 @@ } UnionRect( &childRect, &clientRect, &childRect ); - hmin = childRect.left; - hmax = childRect.right - clientRect.right; - hpos = clientRect.left - childRect.left; - vmin = childRect.top; - vmax = childRect.bottom - clientRect.bottom; - vpos = clientRect.top - childRect.top; + /* set common info values */ + info.cbSize = sizeof(info); + info.fMask = SIF_POS | SIF_RANGE; - switch( scroll ) + /* set the specific */ + switch( scroll ) { + case SB_BOTH: case SB_HORZ: - vpos = hpos; vmin = hmin; vmax = hmax; + info.nMin = childRect.left; + info.nMax = childRect.right - clientRect.right; + info.nPos = clientRect.left - childRect.left; + SetScrollInfo(hwnd, scroll, &info, TRUE); + if (scroll == SB_HORZ) break; + /* fall through */ case SB_VERT: - info.cbSize = sizeof(info); - info.nMax = vmax; info.nMin = vmin; info.nPos = vpos; - info.fMask = SIF_POS | SIF_RANGE; + info.nMin = childRect.top; + info.nMax = childRect.bottom - clientRect.bottom; + info.nPos = clientRect.top - childRect.top; SetScrollInfo(hwnd, scroll, &info, TRUE); break; - case SB_BOTH: - SCROLL_SetNCSbState( hwnd, vmin, vmax, vpos, - hmin, hmax, hpos); - } + } }