mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
selecting a new clipping region into a dc doesn't return the previous clipping region handle
svn path=/trunk/; revision=9499
This commit is contained in:
parent
6248b04e6f
commit
cb1ea2ade7
1 changed files with 10 additions and 20 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: defwnd.c,v 1.139 2004/05/21 12:46:59 weiden Exp $
|
/* $Id: defwnd.c,v 1.140 2004/05/26 18:59:21 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
|
||||||
|
@ -466,15 +466,8 @@ UserDrawWindowFrame(HDC hdc, const RECT *rect,
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID STATIC
|
VOID STATIC
|
||||||
UserDrawMovingFrame(HDC hdc, RECT *rect, BOOL thickframe, HRGN ClipRgn)
|
UserDrawMovingFrame(HDC hdc, RECT *rect, BOOL thickframe)
|
||||||
{
|
{
|
||||||
HGDIOBJ OldObj;
|
|
||||||
|
|
||||||
if(ClipRgn)
|
|
||||||
{
|
|
||||||
OldObj = SelectObject(hdc, ClipRgn);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(thickframe)
|
if(thickframe)
|
||||||
{
|
{
|
||||||
UserDrawWindowFrame(hdc, rect, GetSystemMetrics(SM_CXFRAME), GetSystemMetrics(SM_CYFRAME));
|
UserDrawWindowFrame(hdc, rect, GetSystemMetrics(SM_CXFRAME), GetSystemMetrics(SM_CYFRAME));
|
||||||
|
@ -483,11 +476,6 @@ UserDrawMovingFrame(HDC hdc, RECT *rect, BOOL thickframe, HRGN ClipRgn)
|
||||||
{
|
{
|
||||||
UserDrawWindowFrame(hdc, rect, 1, 1);
|
UserDrawWindowFrame(hdc, rect, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ClipRgn)
|
|
||||||
{
|
|
||||||
SelectObject(hdc, OldObj);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID STATIC
|
VOID STATIC
|
||||||
|
@ -628,6 +616,8 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam)
|
||||||
DesktopRgn = CreateRectRgnIndirect(&clipRect);
|
DesktopRgn = CreateRectRgnIndirect(&clipRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SelectObject(hdc, DesktopRgn);
|
||||||
|
|
||||||
if( iconic ) /* create a cursor for dragging */
|
if( iconic ) /* create a cursor for dragging */
|
||||||
{
|
{
|
||||||
HICON hIcon = (HICON)GetClassLongW(hwnd, GCL_HICON);
|
HICON hIcon = (HICON)GetClassLongW(hwnd, GCL_HICON);
|
||||||
|
@ -639,7 +629,7 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam)
|
||||||
/* invert frame if WIN31_LOOK to indicate mouse click on caption */
|
/* invert frame if WIN31_LOOK to indicate mouse click on caption */
|
||||||
if( !iconic && !DragFullWindows)
|
if( !iconic && !DragFullWindows)
|
||||||
{
|
{
|
||||||
UserDrawMovingFrame( hdc, &sizingRect, thickframe, DesktopRgn );
|
UserDrawMovingFrame( hdc, &sizingRect, thickframe);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(;;)
|
for(;;)
|
||||||
|
@ -655,9 +645,9 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam)
|
||||||
|
|
||||||
if (msg.message == WM_PAINT)
|
if (msg.message == WM_PAINT)
|
||||||
{
|
{
|
||||||
if(!iconic && !DragFullWindows) UserDrawMovingFrame( hdc, &sizingRect, thickframe, DesktopRgn );
|
if(!iconic && !DragFullWindows) UserDrawMovingFrame( hdc, &sizingRect, thickframe );
|
||||||
UpdateWindow( msg.hwnd );
|
UpdateWindow( msg.hwnd );
|
||||||
if(!iconic && !DragFullWindows) UserDrawMovingFrame( hdc, &sizingRect, thickframe, DesktopRgn );
|
if(!iconic && !DragFullWindows) UserDrawMovingFrame( hdc, &sizingRect, thickframe );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -706,7 +696,7 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam)
|
||||||
else if (ON_RIGHT_BORDER(hittest)) newRect.right += dx;
|
else if (ON_RIGHT_BORDER(hittest)) newRect.right += dx;
|
||||||
if (ON_TOP_BORDER(hittest)) newRect.top += dy;
|
if (ON_TOP_BORDER(hittest)) newRect.top += dy;
|
||||||
else if (ON_BOTTOM_BORDER(hittest)) newRect.bottom += dy;
|
else if (ON_BOTTOM_BORDER(hittest)) newRect.bottom += dy;
|
||||||
if(!iconic && !DragFullWindows) UserDrawMovingFrame( hdc, &sizingRect, thickframe, DesktopRgn );
|
if(!iconic && !DragFullWindows) UserDrawMovingFrame( hdc, &sizingRect, thickframe );
|
||||||
capturePoint = pt;
|
capturePoint = pt;
|
||||||
|
|
||||||
/* determine the hit location */
|
/* determine the hit location */
|
||||||
|
@ -717,7 +707,7 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam)
|
||||||
if (!iconic)
|
if (!iconic)
|
||||||
{
|
{
|
||||||
if(!DragFullWindows)
|
if(!DragFullWindows)
|
||||||
UserDrawMovingFrame( hdc, &newRect, thickframe, DesktopRgn );
|
UserDrawMovingFrame( hdc, &newRect, thickframe );
|
||||||
else {
|
else {
|
||||||
/* To avoid any deadlocks, all the locks on the windows
|
/* To avoid any deadlocks, all the locks on the windows
|
||||||
structures must be suspended before the SetWindowPos */
|
structures must be suspended before the SetWindowPos */
|
||||||
|
@ -744,7 +734,7 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam)
|
||||||
DestroyCursor( hDragCursor );
|
DestroyCursor( hDragCursor );
|
||||||
}
|
}
|
||||||
else if(!DragFullWindows)
|
else if(!DragFullWindows)
|
||||||
UserDrawMovingFrame( hdc, &sizingRect, thickframe, DesktopRgn );
|
UserDrawMovingFrame( hdc, &sizingRect, thickframe );
|
||||||
|
|
||||||
if (Style & WS_CHILD)
|
if (Style & WS_CHILD)
|
||||||
ReleaseDC( hWndParent, hdc );
|
ReleaseDC( hWndParent, hdc );
|
||||||
|
|
Loading…
Reference in a new issue