mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 14:53:40 +00:00
Return nTrackPos if requested
svn path=/trunk/; revision=7629
This commit is contained in:
parent
1ec39bbe83
commit
95adb6598c
1 changed files with 13 additions and 2 deletions
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: scrollbar.c,v 1.25 2004/01/13 17:14:38 navaraf Exp $
|
/* $Id: scrollbar.c,v 1.26 2004/01/14 22:18:35 gvg Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -232,6 +232,11 @@ IntGetScrollInfo(PWINDOW_OBJECT Window, INT nBar, LPSCROLLINFO lpsi)
|
||||||
lpsi->nMin = psi->nMin;
|
lpsi->nMin = psi->nMin;
|
||||||
lpsi->nMax = psi->nMax;
|
lpsi->nMax = psi->nMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(Mask & SIF_TRACKPOS)
|
||||||
|
{
|
||||||
|
lpsi->nTrackPos = psi->nTrackPos;
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -649,7 +654,7 @@ NtUserGetScrollInfo(HWND hwnd, int fnBar, LPSCROLLINFO lpsi)
|
||||||
DWORD sz;
|
DWORD sz;
|
||||||
BOOL Ret;
|
BOOL Ret;
|
||||||
|
|
||||||
Status = MmCopyFromCaller(&psi, lpsi, sizeof(SCROLLINFO) - sizeof(psi.nTrackPos));
|
Status = MmCopyFromCaller(&psi.cbSize, &(lpsi->cbSize), sizeof(UINT));
|
||||||
if(!NT_SUCCESS(Status) ||
|
if(!NT_SUCCESS(Status) ||
|
||||||
!((psi.cbSize == sizeof(SCROLLINFO)) || (psi.cbSize == sizeof(SCROLLINFO) - sizeof(psi.nTrackPos))))
|
!((psi.cbSize == sizeof(SCROLLINFO)) || (psi.cbSize == sizeof(SCROLLINFO) - sizeof(psi.nTrackPos))))
|
||||||
{
|
{
|
||||||
|
@ -657,6 +662,12 @@ NtUserGetScrollInfo(HWND hwnd, int fnBar, LPSCROLLINFO lpsi)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
sz = psi.cbSize;
|
sz = psi.cbSize;
|
||||||
|
Status = MmCopyFromCaller(&psi, lpsi, sz);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
SetLastNtError(Status);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
Window = IntGetWindowObject(hwnd);
|
Window = IntGetWindowObject(hwnd);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue