mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
added ros-internal NtUserSetScrollBarInfo()
svn path=/trunk/; revision=7184
This commit is contained in:
parent
6171a32cfa
commit
704f9a0abe
|
@ -500,6 +500,7 @@ NtUserSetParent 2
|
|||
NtUserSetProcessWindowStation 1
|
||||
NtUserSetProp 3
|
||||
NtUserSetRipFlags 2
|
||||
NtUserSetScrollBarInfo 3
|
||||
NtUserSetScrollInfo 4
|
||||
NtUserSetShellWindowEx 2
|
||||
NtUserSetSysColors 4
|
||||
|
|
|
@ -1852,6 +1852,21 @@ NtUserDereferenceWndProcHandle(WNDPROC wpHandle, WndProcHandle *Data);
|
|||
|
||||
VOID STDCALL
|
||||
NtUserManualGuiCheck(LONG Check);
|
||||
|
||||
typedef struct _SETSCROLLBARINFO
|
||||
{
|
||||
int nTrackPos;
|
||||
int reserved;
|
||||
DWORD rgstate[CCHILDREN_SCROLLBAR+1];
|
||||
} SETSCROLLBARINFO, *PSETSCROLLBARINFO;
|
||||
|
||||
BOOL
|
||||
STDCALL
|
||||
NtUserSetScrollBarInfo(
|
||||
HWND hwnd,
|
||||
LONG idObject,
|
||||
SETSCROLLBARINFO *info);
|
||||
|
||||
#endif /* __WIN32K_NTUSER_H */
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: scrollbar.c,v 1.20 2003/12/22 19:55:39 navaraf Exp $
|
||||
/* $Id: scrollbar.c,v 1.21 2003/12/22 20:44:02 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -916,6 +916,71 @@ NtUserEnableScrollBar(
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL
|
||||
STDCALL
|
||||
NtUserSetScrollBarInfo(
|
||||
HWND hwnd,
|
||||
LONG idObject,
|
||||
SETSCROLLBARINFO *info)
|
||||
{
|
||||
PWINDOW_OBJECT Window;
|
||||
SETSCROLLBARINFO Safeinfo;
|
||||
PSCROLLBARINFO sbi = NULL;
|
||||
LPSCROLLINFO psi;
|
||||
NTSTATUS Status;
|
||||
|
||||
Window = IntGetWindowObject(hwnd);
|
||||
|
||||
if(!Window)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Status = MmCopyFromCaller(&Safeinfo, info, sizeof(SETSCROLLBARINFO));
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
IntReleaseWindowObject(Window);
|
||||
SetLastNtError(Status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
switch(idObject)
|
||||
{
|
||||
case OBJID_HSCROLL:
|
||||
sbi = Window->pHScroll;
|
||||
break;
|
||||
case OBJID_VSCROLL:
|
||||
sbi = Window->pVScroll;
|
||||
break;
|
||||
case OBJID_CLIENT:
|
||||
/* FIXME */
|
||||
IntReleaseWindowObject(Window);
|
||||
return FALSE;
|
||||
|
||||
default:
|
||||
IntReleaseWindowObject(Window);
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(!sbi)
|
||||
{
|
||||
DPRINT1("SCROLLBARINFO structure not allocated!\n");
|
||||
IntReleaseWindowObject(Window);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
psi = (LPSCROLLINFO)((PSCROLLBARINFO)(sbi + 1));
|
||||
|
||||
psi->nTrackPos = Safeinfo.nTrackPos;
|
||||
sbi->reserved = Safeinfo.reserved;
|
||||
RtlCopyMemory(&sbi->rgstate, &Safeinfo.rgstate, sizeof(Safeinfo.rgstate));
|
||||
|
||||
IntReleaseWindowObject(Window);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserSetScrollInfo(
|
||||
|
|
Loading…
Reference in a new issue