renamed and fixed a few functions regarding scrollbars

svn path=/trunk/; revision=6004
This commit is contained in:
Thomas Bluemel 2003-09-07 09:55:52 +00:00
parent 94b5d29d89
commit 76286b9a50
7 changed files with 221 additions and 105 deletions

View file

@ -471,9 +471,9 @@ NtUserInsertMenuItem(
DWORD DWORD
STDCALL STDCALL
NtUserEnableScrollBar( NtUserEnableScrollBar(
DWORD Unknown0, HWND hWnd,
DWORD Unknown1, UINT wSBflags,
DWORD Unknown2); UINT wArrows);
DWORD DWORD
STDCALL STDCALL
@ -1220,13 +1220,13 @@ NtUserSBGetParms(
DWORD DWORD
STDCALL STDCALL
NtUserScrollDC( NtUserScrollDC(
DWORD Unknown0, HDC hDC,
DWORD Unknown1, int dx,
DWORD Unknown2, int dy,
DWORD Unknown3, CONST RECT *lprcScroll,
DWORD Unknown4, CONST RECT *lprcClip ,
DWORD Unknown5, HRGN hrgnUpdate,
DWORD Unknown6); LPRECT lprcUpdate);
DWORD DWORD
STDCALL STDCALL
@ -1441,10 +1441,10 @@ NtUserSetRipFlags(
DWORD DWORD
STDCALL STDCALL
NtUserSetScrollInfo( NtUserSetScrollInfo(
DWORD Unknown0, HWND hwnd,
DWORD Unknown1, int fnBar,
DWORD Unknown2, LPCSCROLLINFO lpsi,
DWORD Unknown3); WINBOOL fRedraw);
DWORD DWORD
STDCALL STDCALL

View file

@ -1,4 +1,4 @@
/* $Id: scrollbar.c,v 1.11 2003/08/07 04:03:23 royce Exp $ /* $Id: scrollbar.c,v 1.12 2003/09/07 09:55:52 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -14,6 +14,8 @@
#include <user32.h> #include <user32.h>
#include <debug.h> #include <debug.h>
#include <draw.h> #include <draw.h>
#include <stdlib.h>
#include <string.h>
/* GLOBAL VARIABLES **********************************************************/ /* GLOBAL VARIABLES **********************************************************/
/* /*
@ -51,16 +53,13 @@ static HBITMAP hRgArrowI;
#define SA_SSI_REFRESH 0x0004 #define SA_SSI_REFRESH 0x0004
#define SA_SSI_REPAINT_ARROWS 0x0008 #define SA_SSI_REPAINT_ARROWS 0x0008
/* Scroll-bar hit testing */ /* Scroll-bar hit testing */
enum SCROLL_HITTEST #define SCROLL_NOWHERE 0x01 /* Outside the scroll bar */
{ #define SCROLL_TOP_ARROW 0x02 /* Top or left arrow */
SCROLL_NOWHERE, /* Outside the scroll bar */ #define SCROLL_TOP_RECT 0x04 /* Rectangle between the top arrow and the thumb */
SCROLL_TOP_ARROW, /* Top or left arrow */ #define SCROLL_THUMB 0x08 /* Thumb rectangle */
SCROLL_TOP_RECT, /* Rectangle between the top arrow and the thumb */ #define SCROLL_BOTTOM_RECT 0x10 /* Rectangle between the thumb and the bottom arrow */
SCROLL_THUMB, /* Thumb rectangle */ #define SCROLL_BOTTOM_ARROW 0x20 /* Bottom or right arrow */
SCROLL_BOTTOM_RECT, /* Rectangle between the thumb and the bottom arrow */
SCROLL_BOTTOM_ARROW /* Bottom or right arrow */
};
static BOOL SCROLL_MovingThumb = FALSE; /* Is the moving thumb being displayed? */ static BOOL SCROLL_MovingThumb = FALSE; /* Is the moving thumb being displayed? */
@ -69,22 +68,26 @@ static HWND SCROLL_TrackingWin = 0;
static INT SCROLL_TrackingBar = 0; static INT SCROLL_TrackingBar = 0;
static INT SCROLL_TrackingPos = 0; static INT SCROLL_TrackingPos = 0;
/* static INT SCROLL_TrackingVal = 0; */ /* static INT SCROLL_TrackingVal = 0; */
static enum SCROLL_HITTEST SCROLL_trackHitTest; /* Hit test code of the last button-down event */ static DWORD SCROLL_trackHitTest; /* Hit test code of the last button-down event */
static BOOL SCROLL_trackVertical; static BOOL SCROLL_trackVertical;
/* FUNCTIONS /* INTERNAL FUNCTIONS *********************************************************/
*****************************************************************/
HBRUSH DefWndControlColor (HDC hDC, UINT ctlType); HBRUSH DefWndControlColor (HDC hDC, UINT ctlType);
DWORD FASTCALL
WINBOOL STDCALL SCROLL_HitTest(HWND hwnd, LONG idObject, POINT Point)
GetScrollBarInfo (HWND hwnd, LONG idObject, PSCROLLBARINFO psbi)
{ {
int ret = NtUserGetScrollBarInfo (hwnd, idObject, psbi); RECT WindowRect;
return ret; GetWindowRect(hwnd, &WindowRect);
if (!PtInRect(&WindowRect, Point))
{
return(SCROLL_NOWHERE);
}
return SCROLL_NOWHERE;
} }
/* Ported from WINE20020904 */ /* Ported from WINE20020904 */
@ -114,6 +117,8 @@ DbgPrint("[SCROLL_DrawInterior:%d]\n", nBar);
if ( nBar == SB_CTL ) if ( nBar == SB_CTL )
{ {
hBrush = (HBRUSH) NtUserSendMessage (GetParent (hwnd), WM_CTLCOLORSCROLLBAR, (WPARAM) hdc, (LPARAM) hwnd); hBrush = (HBRUSH) NtUserSendMessage (GetParent (hwnd), WM_CTLCOLORSCROLLBAR, (WPARAM) hdc, (LPARAM) hwnd);
if(!hBrush)
hBrush = GetSysColorBrush(COLOR_SCROLLBAR);
} }
else else
{ {
@ -269,7 +274,7 @@ SCROLL_DrawScrollBar (HWND hwnd, HDC hdc, INT nBar,
BOOL vertical; BOOL vertical;
info.cbSize = sizeof(SCROLLBARINFO); info.cbSize = sizeof(SCROLLBARINFO);
GetScrollBarInfo (hwnd, nBar, &info); NtUserGetScrollBarInfo (hwnd, nBar, &info);
thumbSize = info.xyThumbBottom - info.xyThumbTop; thumbSize = info.xyThumbBottom - info.xyThumbTop;
@ -343,6 +348,48 @@ END:;
/* WIN_ReleaseWndPtr(wndPtr); */ /* WIN_ReleaseWndPtr(wndPtr); */
} }
/* FUNCTIONS ******************************************************************/
/*
* @unimplemented
*/
WINBOOL STDCALL
EnableScrollBar(HWND hWnd, UINT wSBflags, UINT wArrows)
{
UNIMPLEMENTED;
return FALSE;
}
/*
* @implemented
*/
WINBOOL STDCALL
GetScrollBarInfo(HWND hwnd, LONG idObject, PSCROLLBARINFO psbi)
{
SCROLLBARINFO sbi;
WINBOOL ret;
if(!psbi)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
RtlCopyMemory(&sbi, psbi, sizeof(SCROLLBARINFO));
ret = NtUserGetScrollBarInfo (hwnd, idObject, psbi);
if(ret)
RtlCopyMemory(psbi, &sbi, sizeof(SCROLLBARINFO));
return ret;
}
/*
* @unimplemented
*/
WINBOOL STDCALL WINBOOL STDCALL
GetScrollInfo (HWND hwnd, int fnBar, LPSCROLLINFO lpsi) GetScrollInfo (HWND hwnd, int fnBar, LPSCROLLINFO lpsi)
{ {
@ -350,6 +397,10 @@ GetScrollInfo (HWND hwnd, int fnBar, LPSCROLLINFO lpsi)
return FALSE; return FALSE;
} }
/*
* @unimplemented
*/
int STDCALL int STDCALL
GetScrollPos (HWND hWnd, int nBar) GetScrollPos (HWND hWnd, int nBar)
{ {
@ -357,6 +408,10 @@ GetScrollPos (HWND hWnd, int nBar)
return 0; return 0;
} }
/*
* @unimplemented
*/
WINBOOL STDCALL WINBOOL STDCALL
GetScrollRange (HWND hWnd, int nBar, LPINT lpMinPos, LPINT lpMaxPos) GetScrollRange (HWND hWnd, int nBar, LPINT lpMinPos, LPINT lpMaxPos)
{ {
@ -364,6 +419,10 @@ GetScrollRange (HWND hWnd, int nBar, LPINT lpMinPos, LPINT lpMaxPos)
return FALSE; return FALSE;
} }
/*
* @unimplemented
*/
int STDCALL int STDCALL
SetScrollInfo (HWND hwnd, int fnBar, LPCSCROLLINFO lpsi, WINBOOL fRedraw) SetScrollInfo (HWND hwnd, int fnBar, LPCSCROLLINFO lpsi, WINBOOL fRedraw)
{ {
@ -371,6 +430,10 @@ SetScrollInfo (HWND hwnd, int fnBar, LPCSCROLLINFO lpsi, WINBOOL fRedraw)
return 0; return 0;
} }
/*
* @unimplemented
*/
int STDCALL int STDCALL
SetScrollPos (HWND hWnd, int nBar, int nPos, WINBOOL bRedraw) SetScrollPos (HWND hWnd, int nBar, int nPos, WINBOOL bRedraw)
{ {
@ -378,6 +441,10 @@ SetScrollPos (HWND hWnd, int nBar, int nPos, WINBOOL bRedraw)
return 0; return 0;
} }
/*
* @unimplemented
*/
WINBOOL STDCALL WINBOOL STDCALL
SetScrollRange (HWND hWnd, SetScrollRange (HWND hWnd,
int nBar, int nMinPos, int nMaxPos, WINBOOL bRedraw) int nBar, int nMinPos, int nMaxPos, WINBOOL bRedraw)
@ -386,10 +453,12 @@ SetScrollRange (HWND hWnd,
return FALSE; return FALSE;
} }
/* Ported from WINE20020904 */
/*
* @implemented
*/
WINBOOL STDCALL WINBOOL STDCALL
ShowScrollBar (HWND hWnd, int wBar, WINBOOL bShow) ShowScrollBar (HWND hWnd, int wBar, WINBOOL bShow)
{ {
NtUserShowScrollBar (hWnd, wBar, bShow); return (WINBOOL)NtUserShowScrollBar (hWnd, wBar, bShow);
return TRUE;
} }

View file

@ -1,4 +1,4 @@
/* $Id: stubs.c,v 1.40 2003/08/28 19:37:00 gvg Exp $ /* $Id: stubs.c,v 1.41 2003/09/07 09:55:52 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll * PROJECT: ReactOS user32.dll
@ -126,23 +126,6 @@ CopyImage(
} }
/*
* @unimplemented
*/
WINBOOL
STDCALL
EnableScrollBar(
HWND hWnd,
UINT wSBflags,
UINT wArrows)
{
UNIMPLEMENTED;
return FALSE;
}
/* /*
* @unimplemented * @unimplemented
*/ */

View file

@ -1,4 +1,4 @@
/* $Id: defwnd.c,v 1.78 2003/09/06 16:59:30 weiden Exp $ /* $Id: defwnd.c,v 1.79 2003/09/07 09:55:52 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll * PROJECT: ReactOS user32.dll
@ -862,7 +862,7 @@ DefWndHitTestNC(HWND hWnd, POINT Point)
} }
VOID STATIC VOID STATIC
DefWndDoButtonHandle(HWND hWnd, WPARAM wParam) DefWndDoButton(HWND hWnd, WPARAM wParam)
{ {
MSG Msg; MSG Msg;
BOOL InBtn = TRUE, HasBtn = FALSE; BOOL InBtn = TRUE, HasBtn = FALSE;
@ -929,6 +929,16 @@ done:
return; return;
} }
VOID STATIC
DefWndDoScrollBarDown(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
POINT Point;
Point.x = SLOWORD(lParam);
Point.y = SHIWORD(lParam);
SendMessageA(hWnd, WM_SYSCOMMAND, Msg + (UINT)wParam, lParam);
}
LRESULT LRESULT
DefWndHandleLButtonDownNC(HWND hWnd, WPARAM wParam, LPARAM lParam) DefWndHandleLButtonDownNC(HWND hWnd, WPARAM wParam, LPARAM lParam)
{ {
@ -965,19 +975,21 @@ DefWndHandleLButtonDownNC(HWND hWnd, WPARAM wParam, LPARAM lParam)
} }
case HTHSCROLL: case HTHSCROLL:
{ {
SendMessageA(hWnd, WM_SYSCOMMAND, SC_HSCROLL + HTHSCROLL, lParam); DefWndDoScrollBarDown(hWnd, SC_HSCROLL, HTHSCROLL, lParam);
//SendMessageA(hWnd, WM_SYSCOMMAND, SC_HSCROLL + HTHSCROLL, lParam);
break; break;
} }
case HTVSCROLL: case HTVSCROLL:
{ {
SendMessageA(hWnd, WM_SYSCOMMAND, SC_VSCROLL + HTVSCROLL, lParam); DefWndDoScrollBarDown(hWnd, SC_VSCROLL, HTVSCROLL, lParam);
//SendMessageA(hWnd, WM_SYSCOMMAND, SC_VSCROLL + HTVSCROLL, lParam);
break; break;
} }
case HTMINBUTTON: case HTMINBUTTON:
case HTMAXBUTTON: case HTMAXBUTTON:
case HTCLOSE: case HTCLOSE:
{ {
DefWndDoButtonHandle(hWnd, wParam); DefWndDoButton(hWnd, wParam);
break; break;
} }
case HTLEFT: case HTLEFT:

View file

@ -1,2 +1,2 @@
DWORD FASTCALL SCROLL_CreateScrollBar(PWINDOW_OBJECT Window, LONG idObject); DWORD FASTCALL IntCreateScrollBar(PWINDOW_OBJECT Window, LONG idObject);
DWORD STDCALL SCROLL_GetScrollBarInfo(PWINDOW_OBJECT Window, LONG idObject, PSCROLLBARINFO psbi); BOOL FASTCALL IntDestroyScrollBar(PWINDOW_OBJECT Window, LONG idObject);

View file

@ -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.8 2003/08/19 11:48:50 weiden Exp $ /* $Id: scrollbar.c,v 1.9 2003/09/07 09:55:52 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -53,8 +53,8 @@
* 'thumbSize' returns the size of the thumb, and 'thumbPos' returns the position of the thumb relative to the left or to * 'thumbSize' returns the size of the thumb, and 'thumbPos' returns the position of the thumb relative to the left or to
* the top. Return TRUE if the scrollbar is vertical, FALSE if horizontal. * the top. Return TRUE if the scrollbar is vertical, FALSE if horizontal.
*/ */
static BOOL STDCALL BOOL STDCALL
SCROLL_GetScrollBarRect (PWINDOW_OBJECT Window, INT nBar, PRECT lprect) IntGetScrollBarRect (PWINDOW_OBJECT Window, INT nBar, PRECT lprect)
{ {
BOOL vertical; BOOL vertical;
RECT ClientRect = Window->ClientRect; RECT ClientRect = Window->ClientRect;
@ -105,17 +105,21 @@ SCROLL_GetScrollBarRect (PWINDOW_OBJECT Window, INT nBar, PRECT lprect)
return vertical; return vertical;
} }
DWORD FASTCALL SCROLL_CreateScrollBar(PWINDOW_OBJECT Window, LONG idObject) DWORD FASTCALL
IntCreateScrollBar(PWINDOW_OBJECT Window, LONG idObject)
{ {
PSCROLLBARINFO psbi; PSCROLLBARINFO psbi;
LRESULT Result; LRESULT Result;
INT i; INT i;
psbi = ExAllocatePool(PagedPool, sizeof(SCROLLBARINFO));
if(!psbi)
return FALSE;
Result = WinPosGetNonClientSize(Window->Self, Result = WinPosGetNonClientSize(Window->Self,
&Window->WindowRect, &Window->WindowRect,
&Window->ClientRect); &Window->ClientRect);
psbi = ExAllocatePool(PagedPool, sizeof(SCROLLBARINFO));
psbi->cbSize = sizeof(SCROLLBARINFO); psbi->cbSize = sizeof(SCROLLBARINFO);
for (i=0; i<CCHILDREN_SCROLLBAR+1; i++) for (i=0; i<CCHILDREN_SCROLLBAR+1; i++)
@ -133,58 +137,98 @@ DWORD FASTCALL SCROLL_CreateScrollBar(PWINDOW_OBJECT Window, LONG idObject)
Window->wExtra = psbi; Window->wExtra = psbi;
break; break;
default: default:
ExFreePool(psbi);
return FALSE; return FALSE;
} }
SCROLL_GetScrollBarRect (Window, idObject, &(psbi->rcScrollBar)); IntGetScrollBarRect (Window, idObject, &(psbi->rcScrollBar));
return 0; return 0;
} }
DWORD STDCALL SCROLL_GetScrollBarInfo(PWINDOW_OBJECT Window, LONG idObject, PSCROLLBARINFO psbi) BOOL FASTCALL
IntDestroyScrollBar(PWINDOW_OBJECT Window, LONG idObject)
{ {
switch(idObject) switch(idObject)
{ {
case SB_HORZ: case SB_HORZ:
memcpy(psbi, Window->pHScroll, psbi->cbSize); if(Window->pHScroll)
break; {
ExFreePool(Window->pHScroll);
Window->pHScroll = NULL;
return TRUE;
}
return FALSE;
case SB_VERT: case SB_VERT:
memcpy(psbi, Window->pVScroll, psbi->cbSize); if(Window->pVScroll)
break; {
ExFreePool(Window->pVScroll);
Window->pVScroll = NULL;
return TRUE;
}
return FALSE;
case SB_CTL: case SB_CTL:
memcpy(psbi, Window->wExtra, psbi->cbSize); if(Window->wExtra)
break; {
default: ExFreePool(Window->wExtra);
IntReleaseWindowObject(Window); Window->wExtra = NULL;
return TRUE;
}
return FALSE; return FALSE;
} }
return FALSE;
SCROLL_GetScrollBarRect (Window, idObject, &(psbi->rcScrollBar));
return TRUE;
} }
DWORD DWORD
STDCALL STDCALL
NtUserGetScrollBarInfo(HWND hWnd, LONG idObject, PSCROLLBARINFO psbi) NtUserGetScrollBarInfo(HWND hWnd, LONG idObject, PSCROLLBARINFO psbi)
{ {
PWINDOW_OBJECT Window = IntGetWindowObject(hWnd); PWINDOW_OBJECT Window;
if (!Window) return FALSE; if(!psbi || (psbi->cbSize != sizeof(SCROLLBARINFO)))
{
SetLastWin32Error(ERROR_INVALID_PARAMETER);
return FALSE;
}
SCROLL_GetScrollBarInfo(Window, idObject, psbi); Window = IntGetWindowObject(hWnd);
if(!Window)
{
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
return FALSE;
}
switch(idObject)
{
case SB_HORZ:
memcpy(psbi, Window->pHScroll, sizeof(SCROLLBARINFO));
break;
case SB_VERT:
memcpy(psbi, Window->pVScroll, sizeof(SCROLLBARINFO));
break;
case SB_CTL:
memcpy(psbi, Window->wExtra, sizeof(SCROLLBARINFO));
break;
default:
IntReleaseWindowObject(Window);
SetLastWin32Error(ERROR_INVALID_PARAMETER);
return FALSE;
}
IntGetScrollBarRect (Window, idObject, &(psbi->rcScrollBar));
IntReleaseWindowObject(Window); IntReleaseWindowObject(Window);
return TRUE; return TRUE;
} }
DWORD DWORD
STDCALL STDCALL
NtUserEnableScrollBar( NtUserEnableScrollBar(
DWORD Unknown0, HWND hWnd,
DWORD Unknown1, UINT wSBflags,
DWORD Unknown2) UINT wArrows)
{ {
return 0; return 0;
} }
@ -192,13 +236,13 @@ NtUserEnableScrollBar(
DWORD DWORD
STDCALL STDCALL
NtUserScrollDC( NtUserScrollDC(
DWORD Unknown0, HDC hDC,
DWORD Unknown1, int dx,
DWORD Unknown2, int dy,
DWORD Unknown3, CONST RECT *lprcScroll,
DWORD Unknown4, CONST RECT *lprcClip ,
DWORD Unknown5, HRGN hrgnUpdate,
DWORD Unknown6) LPRECT lprcUpdate)
{ {
UNIMPLEMENTED UNIMPLEMENTED
@ -209,10 +253,10 @@ NtUserScrollDC(
DWORD DWORD
STDCALL STDCALL
NtUserSetScrollInfo( NtUserSetScrollInfo(
DWORD Unknown0, HWND hwnd,
DWORD Unknown1, int fnBar,
DWORD Unknown2, LPCSCROLLINFO lpsi,
DWORD Unknown3) WINBOOL fRedraw)
{ {
UNIMPLEMENTED UNIMPLEMENTED
@ -227,11 +271,16 @@ NtUserShowScrollBar(HWND hWnd, int wBar, DWORD bShow)
BOOL fShowV = (wBar == SB_VERT) ? 0 : bShow; BOOL fShowV = (wBar == SB_VERT) ? 0 : bShow;
BOOL fShowH = (wBar == SB_HORZ) ? 0 : bShow; BOOL fShowH = (wBar == SB_HORZ) ? 0 : bShow;
PWINDOW_OBJECT Window = IntGetWindowObject(hWnd); PWINDOW_OBJECT Window = IntGetWindowObject(hWnd);
if(!Window)
{
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
return FALSE;
}
switch (wBar) switch (wBar)
{ {
case SB_CTL: case SB_CTL:
NtUserShowWindow (hWnd, fShowH ? SW_SHOW : SW_HIDE); WinPosShowWindow (hWnd, fShowH ? SW_SHOW : SW_HIDE);
return TRUE; return TRUE;
case SB_BOTH: case SB_BOTH:
@ -274,7 +323,7 @@ NtUserShowScrollBar(HWND hWnd, int wBar, DWORD bShow)
if (fShowH || fShowV) /* frame has been changed, let the window redraw itself */ if (fShowH || fShowV) /* frame has been changed, let the window redraw itself */
{ {
NtUserSetWindowPos (hWnd, 0, 0, 0, 0, 0, WinPosSetWindowPos (hWnd, 0, 0, 0, 0, 0,
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED); SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED);
return TRUE; return TRUE;
} }

View file

@ -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: window.c,v 1.106 2003/08/29 09:29:11 gvg Exp $ /* $Id: window.c,v 1.107 2003/09/07 09:55:52 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -249,6 +249,9 @@ static LRESULT IntDestroyWindow(PWINDOW_OBJECT Window,
RemoveEntryList(&Window->ThreadListEntry); RemoveEntryList(&Window->ThreadListEntry);
ExReleaseFastMutexUnsafe (&ThreadData->WindowListLock); ExReleaseFastMutexUnsafe (&ThreadData->WindowListLock);
IntDestroyScrollBar(Window, SB_VERT);
IntDestroyScrollBar(Window, SB_HORZ);
Window->Class = NULL; Window->Class = NULL;
ObmCloseHandle(ProcessData->WindowStation->HandleTable, Window->Self); ObmCloseHandle(ProcessData->WindowStation->HandleTable, Window->Self);
@ -1272,9 +1275,9 @@ NtUserCreateWindowEx(DWORD dwExStyle,
/* Initialize the window's scrollbars */ /* Initialize the window's scrollbars */
if (dwStyle & WS_VSCROLL) if (dwStyle & WS_VSCROLL)
SCROLL_CreateScrollBar(WindowObject, SB_VERT); IntCreateScrollBar(WindowObject, SB_VERT);
if (dwStyle & WS_HSCROLL) if (dwStyle & WS_HSCROLL)
SCROLL_CreateScrollBar(WindowObject, SB_HORZ); IntCreateScrollBar(WindowObject, SB_HORZ);
/* Send a NCCREATE message. */ /* Send a NCCREATE message. */
Cs.lpCreateParams = lpParam; Cs.lpCreateParams = lpParam;