mirror of
https://github.com/reactos/reactos.git
synced 2025-05-29 14:08:22 +00:00
[WIN32SS] Disable scrollbars when SIF_DISABLENOSCROLL is used
CORE-13918
This commit is contained in:
parent
824e5dba51
commit
929a2c6637
1 changed files with 18 additions and 0 deletions
|
@ -58,6 +58,10 @@ DBG_DEFAULT_CHANNEL(UserScrollbar);
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
|
BOOL APIENTRY
|
||||||
|
IntEnableScrollBar(BOOL Horz, PSCROLLBARINFO Info, UINT wArrows);
|
||||||
|
|
||||||
|
|
||||||
/* Ported from WINE20020904 */
|
/* Ported from WINE20020904 */
|
||||||
/* Compute the scroll bar rectangle, in drawing coordinates (i.e. client coords for SB_CTL, window coords for SB_VERT and
|
/* Compute the scroll bar rectangle, in drawing coordinates (i.e. client coords for SB_CTL, window coords for SB_VERT and
|
||||||
* SB_HORZ). 'arrowSize' returns the width or height of an arrow (depending on * the orientation of the scrollbar),
|
* SB_HORZ). 'arrowSize' returns the width or height of an arrow (depending on * the orientation of the scrollbar),
|
||||||
|
@ -203,6 +207,14 @@ IntCalculateThumb(PWND Wnd, LONG idObject, PSCROLLBARINFO psbi, PSBDATA pSBData)
|
||||||
psbi->xyThumbBottom = 0;
|
psbi->xyThumbBottom = 0;
|
||||||
ThumbPos = Thumb;
|
ThumbPos = Thumb;
|
||||||
}
|
}
|
||||||
|
else if (psbi->rgstate[SBRG_TOPRIGHTBTN] == STATE_SYSTEM_UNAVAILABLE &&
|
||||||
|
psbi->rgstate[SBRG_BOTTOMLEFTBTN] == STATE_SYSTEM_UNAVAILABLE &&
|
||||||
|
pSBData->posMin >= (int)(pSBData->posMax - max(pSBData->page - 1, 0)))
|
||||||
|
{
|
||||||
|
/* Nothing to scroll */
|
||||||
|
psbi->xyThumbTop = 0;
|
||||||
|
psbi->xyThumbBottom = 0;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ThumbBox = pSBData->page ? MINTRACKTHUMB : UserGetSystemMetrics(SM_CXHTHUMB);
|
ThumbBox = pSBData->page ? MINTRACKTHUMB : UserGetSystemMetrics(SM_CXHTHUMB);
|
||||||
|
@ -642,6 +654,12 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw)
|
||||||
co_UserRedrawWindow(Window, &UpdateRect, 0, RDW_INVALIDATE | RDW_FRAME);
|
co_UserRedrawWindow(Window, &UpdateRect, 0, RDW_INVALIDATE | RDW_FRAME);
|
||||||
}
|
}
|
||||||
*/ }
|
*/ }
|
||||||
|
|
||||||
|
if (bChangeParams && (nBar == SB_HORZ || nBar == SB_VERT) && (lpsi->fMask & SIF_DISABLENOSCROLL))
|
||||||
|
{
|
||||||
|
IntEnableScrollBar(nBar == SB_HORZ, psbi, Window->pSBInfo->WSBflags);
|
||||||
|
}
|
||||||
|
|
||||||
/* Return current position */
|
/* Return current position */
|
||||||
return lpsi->fMask & SIF_PREVIOUSPOS ? OldPos : pSBData->pos;
|
return lpsi->fMask & SIF_PREVIOUSPOS ? OldPos : pSBData->pos;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue