mirror of
https://github.com/reactos/reactos.git
synced 2024-07-03 03:04:22 +00:00
[Win32SS]
- Implement Fill Window, for testing. svn path=/trunk/; revision=73887
This commit is contained in:
parent
2c28e0e6fa
commit
482d43b875
|
@ -952,23 +952,6 @@ NtUserCtxDisplayIOCtl(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* FillWindow: Called from User; Dialog, Edit and ListBox procs during a WM_ERASEBKGND.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
BOOL APIENTRY
|
|
||||||
NtUserFillWindow(HWND hWndPaint,
|
|
||||||
HWND hWndPaint1,
|
|
||||||
HDC hDC,
|
|
||||||
HBRUSH hBrush)
|
|
||||||
{
|
|
||||||
STUB
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1555,6 +1555,50 @@ IntEndPaint(PWND Wnd, PPAINTSTRUCT Ps)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOL FASTCALL
|
||||||
|
IntFillWindow(PWND pWndParent,
|
||||||
|
PWND pWnd,
|
||||||
|
HDC hDC,
|
||||||
|
HBRUSH hBrush)
|
||||||
|
{
|
||||||
|
RECT Rect, Rect1;
|
||||||
|
INT type;
|
||||||
|
|
||||||
|
if (!pWndParent)
|
||||||
|
pWndParent = pWnd;
|
||||||
|
|
||||||
|
type = GdiGetClipBox(hDC, &Rect);
|
||||||
|
|
||||||
|
IntGetClientRect(pWnd, &Rect1);
|
||||||
|
|
||||||
|
if ( type != NULLREGION && // Clip box is not empty,
|
||||||
|
(!(pWnd->pcls->style & CS_PARENTDC) || // not parent dc or
|
||||||
|
RECTL_bIntersectRect( &Rect, &Rect, &Rect1) ) ) // intersecting.
|
||||||
|
{
|
||||||
|
POINT ppt;
|
||||||
|
INT x = 0, y = 0;
|
||||||
|
|
||||||
|
if ( pWndParent != UserGetDesktopWindow())
|
||||||
|
{
|
||||||
|
x = pWndParent->rcClient.left - pWnd->rcClient.left;
|
||||||
|
y = pWndParent->rcClient.top - pWnd->rcClient.top;
|
||||||
|
}
|
||||||
|
|
||||||
|
GreSetBrushOrg(hDC, x, y, &ppt);
|
||||||
|
|
||||||
|
if ( hBrush < (HBRUSH)CTLCOLOR_MAX )
|
||||||
|
hBrush = GetControlColor( pWndParent, pWnd, hDC, HandleToUlong(hBrush) + WM_CTLCOLORMSGBOX);
|
||||||
|
|
||||||
|
FillRect(hDC, &Rect, hBrush);
|
||||||
|
|
||||||
|
GreSetBrushOrg(hDC, ppt.x, ppt.y, NULL);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* PUBLIC FUNCTIONS ***********************************************************/
|
/* PUBLIC FUNCTIONS ***********************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1655,6 +1699,50 @@ CLEANUP:
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* FillWindow: Called from User; Dialog, Edit and ListBox procs during a WM_ERASEBKGND.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
BOOL APIENTRY
|
||||||
|
NtUserFillWindow(HWND hWndParent,
|
||||||
|
HWND hWnd,
|
||||||
|
HDC hDC,
|
||||||
|
HBRUSH hBrush)
|
||||||
|
{
|
||||||
|
BOOL ret = FALSE;
|
||||||
|
PWND pWnd, pWndParent = NULL;
|
||||||
|
USER_REFERENCE_ENTRY Ref;
|
||||||
|
|
||||||
|
TRACE("Enter NtUserFillWindow\n");
|
||||||
|
UserEnterExclusive();
|
||||||
|
|
||||||
|
if (!hDC)
|
||||||
|
{
|
||||||
|
goto Exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(pWnd = UserGetWindowObject(hWnd)))
|
||||||
|
{
|
||||||
|
goto Exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hWndParent && !(pWndParent = UserGetWindowObject(hWndParent)))
|
||||||
|
{
|
||||||
|
goto Exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
UserRefObjectCo(pWnd, &Ref);
|
||||||
|
ret = IntFillWindow( pWndParent, pWnd, hDC, hBrush );
|
||||||
|
UserDerefObjectCo(pWnd);
|
||||||
|
|
||||||
|
Exit:
|
||||||
|
TRACE("Leave NtUserFillWindow, ret=%i\n",ret);
|
||||||
|
UserLeave();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -102,7 +102,8 @@ UserSystemParametersInfo(
|
||||||
VOID FASTCALL IntSetWindowState(PWND, UINT);
|
VOID FASTCALL IntSetWindowState(PWND, UINT);
|
||||||
VOID FASTCALL IntClearWindowState(PWND, UINT);
|
VOID FASTCALL IntClearWindowState(PWND, UINT);
|
||||||
PTHREADINFO FASTCALL IntTID2PTI(HANDLE);
|
PTHREADINFO FASTCALL IntTID2PTI(HANDLE);
|
||||||
HBRUSH FASTCALL GetControlBrush(PWND pwnd,HDC hdc,UINT ctlType);
|
HBRUSH FASTCALL GetControlBrush(PWND,HDC,UINT);
|
||||||
|
HBRUSH FASTCALL GetControlColor(PWND,PWND,HDC,UINT);
|
||||||
|
|
||||||
/*************** MESSAGE.C ***************/
|
/*************** MESSAGE.C ***************/
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue