added syscall NtUserGetScrollInfo() and fixed nonclient hittest for caption buttons

svn path=/trunk/; revision=6006
This commit is contained in:
Thomas Bluemel 2003-09-07 11:52:54 +00:00
parent f54139ad6e
commit 1a1d4a8874
4 changed files with 141 additions and 16 deletions

View file

@ -405,6 +405,7 @@ NtUserGetProp 2
NtUserGetPriorityClipboardFormat 2
NtUserGetProcessWindowStation 0
NtUserGetScrollBarInfo 3
NtUserGetScrollInfo 3
NtUserGetSystemMenu 2
NtUserGetSystemMetrics 1
NtUserGetThreadDesktop 2

View file

@ -823,9 +823,19 @@ HWINSTA
STDCALL
NtUserGetProcessWindowStation(VOID);
DWORD
BOOL
STDCALL
NtUserGetScrollBarInfo(HWND hWnd, LONG idObject, PSCROLLBARINFO psbi);
NtUserGetScrollBarInfo(
HWND hWnd,
LONG idObject,
PSCROLLBARINFO psbi);
BOOL
STDCALL
NtUserGetScrollInfo(
HWND hwnd,
int fnBar,
LPSCROLLINFO lpsi);
HMENU
STDCALL

View file

@ -1,4 +1,4 @@
/* $Id: defwnd.c,v 1.79 2003/09/07 09:55:52 weiden Exp $
/* $Id: defwnd.c,v 1.80 2003/09/07 11:52:54 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll
@ -800,7 +800,7 @@ DefWndHitTestNC(HWND hWnd, POINT Point)
if (Style & WS_MAXIMIZEBOX || Style & WS_MINIMIZEBOX)
{
WindowRect.right -= GetSystemMetrics(SM_CXSIZE) - 2;
WindowRect.right -= GetSystemMetrics(SM_CXSIZE);
}
if (Point.x >= WindowRect.right)
{
@ -809,7 +809,7 @@ DefWndHitTestNC(HWND hWnd, POINT Point)
if (Style & WS_MINIMIZEBOX)
{
WindowRect.right -= GetSystemMetrics(SM_CXSIZE) - 2;
WindowRect.right -= GetSystemMetrics(SM_CXSIZE);
}
if (Point.x >= WindowRect.right)
{

View file

@ -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.9 2003/09/07 09:55:52 weiden Exp $
/* $Id: scrollbar.c,v 1.10 2003/09/07 11:52:54 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -45,6 +45,14 @@
#define SCROLL_MIN_RECT 4 /* Minimum size of the rectangle between the arrows */
#define SCROLL_ARROW_THUMB_OVERLAP 0 /* Overlap between arrows and thumb */
#define SBRG_SCROLLBAR 0 /* the scrollbar itself */
#define SBRG_TOPRIGHTBTN 1 /* the top or right button */
#define SBRG_PAGEUPRIGHT 2 /* the page up or page right region */
#define SBRG_SCROLLBOX 3 /* the scroll box */
#define SBRG_PAGEDOWNLEFT 4 /* the page down or page left region */
#define SBRG_BOTTOMLEFTBTN 5 /* the bottom or left button */
/* FUNCTIONS *****************************************************************/
/* Ported from WINE20020904 */
@ -180,7 +188,7 @@ IntDestroyScrollBar(PWINDOW_OBJECT Window, LONG idObject)
}
DWORD
BOOL
STDCALL
NtUserGetScrollBarInfo(HWND hWnd, LONG idObject, PSCROLLBARINFO psbi)
{
@ -203,14 +211,26 @@ NtUserGetScrollBarInfo(HWND hWnd, LONG idObject, PSCROLLBARINFO psbi)
switch(idObject)
{
case SB_HORZ:
if(Window->pHScroll)
{
memcpy(psbi, Window->pHScroll, sizeof(SCROLLBARINFO));
break;
}
/* fall through */
case SB_VERT:
if(Window->pVScroll)
{
memcpy(psbi, Window->pVScroll, sizeof(SCROLLBARINFO));
break;
}
/* fall through */
case SB_CTL:
if(Window->wExtra)
{
memcpy(psbi, Window->wExtra, sizeof(SCROLLBARINFO));
break;
}
/* fall through */
default:
IntReleaseWindowObject(Window);
SetLastWin32Error(ERROR_INVALID_PARAMETER);
@ -223,6 +243,43 @@ NtUserGetScrollBarInfo(HWND hWnd, LONG idObject, PSCROLLBARINFO psbi)
return TRUE;
}
BOOL
STDCALL
NtUserGetScrollInfo(HWND hwnd, int fnBar, LPSCROLLINFO lpsi)
{
PWINDOW_OBJECT Window;
PSCROLLBARINFO Info = NULL;
Window = IntGetWindowObject(hwnd);
if(!Window)
{
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
return FALSE;
}
switch(fnBar)
{
case SB_HORZ:
Info = Window->pHScroll;
break;
case SB_VERT:
Info = Window->pVScroll;
break;
case SB_CTL:
Info = Window->wExtra;
break;
default:
IntReleaseWindowObject(Window);
return FALSE;
}
IntReleaseWindowObject(Window);
return FALSE;
}
DWORD
STDCALL
NtUserEnableScrollBar(
@ -230,7 +287,38 @@ NtUserEnableScrollBar(
UINT wSBflags,
UINT wArrows)
{
return 0;
PWINDOW_OBJECT Window;
PSCROLLBARINFO InfoV = NULL, InfoH = NULL;
Window = IntGetWindowObject(hWnd);
if(!Window)
{
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
return FALSE;
}
switch(wSBflags)
{
case SB_BOTH:
InfoV = Window->pVScroll;
/* fall through */
case SB_HORZ:
InfoH = Window->pHScroll;
break;
case SB_VERT:
InfoV = Window->pVScroll;
break;
case SB_CTL:
InfoV = Window->wExtra;
break;
default:
IntReleaseWindowObject(Window);
return FALSE;
}
IntReleaseWindowObject(Window);
return TRUE;
}
DWORD
@ -258,8 +346,34 @@ NtUserSetScrollInfo(
LPCSCROLLINFO lpsi,
WINBOOL fRedraw)
{
UNIMPLEMENTED
PWINDOW_OBJECT Window;
PSCROLLBARINFO Info = NULL;
Window = IntGetWindowObject(hwnd);
if(!Window)
{
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
return 0;
}
switch(fnBar)
{
case SB_HORZ:
Info = Window->pHScroll;
break;
case SB_VERT:
Info = Window->pVScroll;
break;
case SB_CTL:
Info = Window->wExtra;
break;
default:
IntReleaseWindowObject(Window);
return 0;
}
IntReleaseWindowObject(Window);
return 0;
}