mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 01:55:39 +00:00
Bug fixes.
svn path=/trunk/; revision=7193
This commit is contained in:
parent
47a02358b6
commit
6e39aab608
5 changed files with 67 additions and 52 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: defwnd.c,v 1.113 2003/12/22 20:22:40 navaraf Exp $
|
||||
/* $Id: defwnd.c,v 1.114 2003/12/23 08:48:59 navaraf Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS user32.dll
|
||||
|
@ -898,11 +898,19 @@ DefWndControlColor(HDC hDC, UINT ctlType)
|
|||
*/
|
||||
if (bk == GetSysColor(COLOR_WINDOW))
|
||||
{
|
||||
#if 0 /* FIXME */
|
||||
return CACHE_GetPattern55AABrush();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
static const WORD wPattern55AA[] =
|
||||
{
|
||||
0x5555, 0xaaaa, 0x5555, 0xaaaa,
|
||||
0x5555, 0xaaaa, 0x5555, 0xaaaa
|
||||
};
|
||||
static HBITMAP hPattern55AABitmap = NULL;
|
||||
static HBRUSH hPattern55AABrush = NULL;
|
||||
if (hPattern55AABrush == NULL)
|
||||
{
|
||||
hPattern55AABitmap = CreateBitmap(8, 8, 1, 1, wPattern55AA);
|
||||
hPattern55AABrush = CreatePatternBrush(hPattern55AABitmap);
|
||||
}
|
||||
return hPattern55AABrush;
|
||||
}
|
||||
UnrealizeObject(hb);
|
||||
return hb;
|
||||
|
|
|
@ -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.21 2003/12/22 20:44:02 weiden Exp $
|
||||
/* $Id: scrollbar.c,v 1.22 2003/12/23 08:48:59 navaraf Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -135,30 +135,18 @@ IntGetScrollBarRect (PWINDOW_OBJECT Window, INT nBar, PRECT lprect)
|
|||
switch (nBar)
|
||||
{
|
||||
case SB_HORZ:
|
||||
lprect->left = ClientRect.left - WindowRect.left + 1;
|
||||
lprect->left = ClientRect.left - WindowRect.left;
|
||||
lprect->top = ClientRect.bottom - WindowRect.top;
|
||||
lprect->right = ClientRect.right - WindowRect.left - 1;
|
||||
lprect->right = ClientRect.right - WindowRect.left;
|
||||
lprect->bottom = lprect->top + NtUserGetSystemMetrics (SM_CYHSCROLL);
|
||||
if (Window->Style & WS_BORDER)
|
||||
{
|
||||
lprect->left--;
|
||||
lprect->right++;
|
||||
}
|
||||
vertical = FALSE;
|
||||
break;
|
||||
|
||||
case SB_VERT:
|
||||
lprect->left = (ClientRect.right - WindowRect.left);
|
||||
lprect->top = (ClientRect.top - WindowRect.top) + 1;
|
||||
lprect->right = (lprect->left + NtUserGetSystemMetrics (SM_CXVSCROLL));
|
||||
lprect->bottom = (ClientRect.bottom - WindowRect.top) - 1;
|
||||
if (Window->Style & WS_BORDER)
|
||||
{
|
||||
lprect->top--;
|
||||
lprect->bottom++;
|
||||
}
|
||||
else if (Window->Style & WS_HSCROLL)
|
||||
lprect->bottom++;
|
||||
lprect->left = ClientRect.right - WindowRect.left;
|
||||
lprect->top = ClientRect.top - WindowRect.top;
|
||||
lprect->right = lprect->left + NtUserGetSystemMetrics(SM_CXVSCROLL);
|
||||
lprect->bottom = ClientRect.bottom - WindowRect.top;
|
||||
vertical = TRUE;
|
||||
break;
|
||||
|
||||
|
@ -363,9 +351,6 @@ IntSetScrollInfo(PWINDOW_OBJECT Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedr
|
|||
else
|
||||
Mask = lpsi->fMask;
|
||||
|
||||
if(Action)
|
||||
*Action = 0;
|
||||
|
||||
if(Mask & SIF_DISABLENOSCROLL)
|
||||
{
|
||||
/* FIXME */
|
||||
|
@ -380,8 +365,8 @@ IntSetScrollInfo(PWINDOW_OBJECT Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedr
|
|||
psi->nMin = 0;
|
||||
psi->nMax = 0;
|
||||
Chg = TRUE;
|
||||
if(Action)
|
||||
*Action |= SBU_SCROLLBOX;
|
||||
// if(Action)
|
||||
// *Action |= SBU_SCROLLBOX;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -392,8 +377,8 @@ IntSetScrollInfo(PWINDOW_OBJECT Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedr
|
|||
psi->nMin = lpsi->nMin;
|
||||
psi->nMax = lpsi->nMax;
|
||||
Chg = TRUE;
|
||||
if(Action)
|
||||
*Action |= SBU_SCROLLBOX;
|
||||
// if(Action)
|
||||
// *Action |= SBU_SCROLLBOX;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -409,8 +394,8 @@ IntSetScrollInfo(PWINDOW_OBJECT Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedr
|
|||
if(old != psi->nPage)
|
||||
{
|
||||
Chg = TRUE;
|
||||
if(Action)
|
||||
*Action |= SBU_SCROLLBOX;
|
||||
// if(Action)
|
||||
// *Action |= SBU_SCROLLBOX;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -426,8 +411,8 @@ IntSetScrollInfo(PWINDOW_OBJECT Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedr
|
|||
if(old != psi->nPos)
|
||||
{
|
||||
Chg = TRUE;
|
||||
if(Action)
|
||||
*Action |= SBU_SCROLLBOX;
|
||||
// if(Action)
|
||||
// *Action |= SBU_SCROLLBOX;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -596,6 +581,9 @@ IntSetScrollInfo(PWINDOW_OBJECT Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedr
|
|||
#endif
|
||||
}
|
||||
|
||||
if (bRedraw)
|
||||
IntSendMessage(Window->Self, WM_NCPAINT, 1, 0, TRUE);
|
||||
|
||||
/* Return current position */
|
||||
return Info->nPos;
|
||||
#endif
|
||||
|
@ -1017,8 +1005,7 @@ NtUserSetScrollInfo(
|
|||
}
|
||||
|
||||
/* Ported from WINE20020904 (SCROLL_ShowScrollBar) */
|
||||
DWORD
|
||||
STDCALL
|
||||
DWORD STDCALL
|
||||
NtUserShowScrollBar(HWND hWnd, int wBar, DWORD bShow)
|
||||
{
|
||||
PWINDOW_OBJECT Window = IntGetWindowObject(hWnd);
|
||||
|
@ -1039,22 +1026,34 @@ NtUserShowScrollBar(HWND hWnd, int wBar, DWORD bShow)
|
|||
if (wBar == SB_BOTH || wBar == SB_HORZ)
|
||||
{
|
||||
if (bShow)
|
||||
{
|
||||
Window->Style |= WS_HSCROLL;
|
||||
if (!Window->pHScroll)
|
||||
IntCreateScrollBar(Window, SB_HORZ);
|
||||
}
|
||||
else
|
||||
{
|
||||
Window->Style &= ~WS_HSCROLL;
|
||||
}
|
||||
}
|
||||
|
||||
if (wBar == SB_BOTH || wBar == SB_VERT)
|
||||
{
|
||||
if (bShow)
|
||||
{
|
||||
Window->Style |= WS_VSCROLL;
|
||||
if (!Window->pVScroll)
|
||||
IntCreateScrollBar(Window, SB_VERT);
|
||||
}
|
||||
else
|
||||
{
|
||||
Window->Style &= ~WS_VSCROLL;
|
||||
}
|
||||
}
|
||||
|
||||
/* Frame has been changed, let the window redraw itself */
|
||||
WinPosSetWindowPos(hWnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE |
|
||||
SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED);
|
||||
SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED | SWP_NOSENDCHANGING);
|
||||
|
||||
IntReleaseWindowObject(Window);
|
||||
return TRUE;
|
||||
|
|
|
@ -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: windc.c,v 1.46 2003/12/14 19:39:50 gvg Exp $
|
||||
/* $Id: windc.c,v 1.47 2003/12/23 08:48:59 navaraf Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -462,6 +462,8 @@ NtUserGetDCEx(HWND hWnd, HANDLE ClipRegion, ULONG Flags)
|
|||
{
|
||||
Dce->hClipRgn = UnsafeIntCreateRectRgnIndirect(&Window->WindowRect);
|
||||
}
|
||||
NtGdiOffsetRgn(Dce->hClipRgn, -Window->WindowRect.left,
|
||||
-Window->WindowRect.top);
|
||||
}
|
||||
else if (NULL != ClipRegion)
|
||||
{
|
||||
|
|
|
@ -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: window.c,v 1.171 2003/12/22 14:34:25 weiden Exp $
|
||||
/* $Id: window.c,v 1.172 2003/12/23 08:48:59 navaraf Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -1310,9 +1310,15 @@ NtUserCreateWindowEx(DWORD dwExStyle,
|
|||
|
||||
/* Initialize the window's scrollbars */
|
||||
if (dwStyle & WS_VSCROLL)
|
||||
IntCreateScrollBar(WindowObject, SB_VERT);
|
||||
{
|
||||
WindowObject->Style &= ~WS_VSCROLL;
|
||||
NtUserShowScrollBar(WindowObject->Self, SB_VERT, TRUE);
|
||||
}
|
||||
if (dwStyle & WS_HSCROLL)
|
||||
IntCreateScrollBar(WindowObject, SB_HORZ);
|
||||
{
|
||||
WindowObject->Style &= ~WS_HSCROLL;
|
||||
NtUserShowScrollBar(WindowObject->Self, SB_HORZ, TRUE);
|
||||
}
|
||||
|
||||
/* Send a NCCREATE message. */
|
||||
Cs.cx = nWidth;
|
||||
|
|
|
@ -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: winpos.c,v 1.61 2003/12/22 15:30:21 navaraf Exp $
|
||||
/* $Id: winpos.c,v 1.62 2003/12/23 08:48:59 navaraf Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -758,8 +758,8 @@ WinPosSetWindowPos(HWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx,
|
|||
/*
|
||||
* Only allow CSRSS to mess with the desktop window
|
||||
*/
|
||||
if (Wnd == IntGetDesktopWindow()
|
||||
&& Window->OwnerThread->ThreadsProcess != PsGetCurrentProcess())
|
||||
if (Wnd == IntGetDesktopWindow() &&
|
||||
Window->OwnerThread->ThreadsProcess != PsGetCurrentProcess())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1051,7 +1051,7 @@ WinPosSetWindowPos(HWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx,
|
|||
}
|
||||
}
|
||||
|
||||
/* FIXME: Check some conditions before doing this. */
|
||||
if ((WinPos.flags & SWP_AGG_STATUSFLAGS) != SWP_AGG_NOPOSCHANGE)
|
||||
IntSendWINDOWPOSCHANGEDMessage(WinPos.hwnd, &WinPos);
|
||||
|
||||
IntReleaseWindowObject(Window);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue