gdi32: Return copies of the region in InquireVisRgn16 and GetClipRgn16.

This commit is contained in:
Alexandre Julliard 2009-11-17 12:26:04 +01:00
parent 569f56e87a
commit 61925b7e89
1 changed files with 10 additions and 16 deletions

View File

@ -3659,14 +3659,11 @@ DWORD WINAPI SetDCOrg16( HDC16 hdc16, INT16 x, INT16 y )
*/
HRGN16 WINAPI InquireVisRgn16( HDC16 hdc )
{
HRGN16 ret = 0;
DC * dc = get_dc_ptr( HDC_32(hdc) );
if (dc)
{
ret = HRGN_16(dc->hVisRgn);
release_dc_ptr( dc );
}
return ret;
static HRGN hrgn;
if (!hrgn) hrgn = CreateRectRgn( 0, 0, 0, 0 );
GetRandomRgn( HDC_32(hdc), hrgn, SYSRGN );
return HRGN_16(hrgn);
}
@ -3760,14 +3757,11 @@ INT16 WINAPI RestoreVisRgn16( HDC16 hdc16 )
*/
HRGN16 WINAPI GetClipRgn16( HDC16 hdc )
{
HRGN16 ret = 0;
DC * dc = get_dc_ptr( HDC_32(hdc) );
if (dc)
{
ret = HRGN_16(dc->hClipRgn);
release_dc_ptr( dc );
}
return ret;
static HRGN hrgn;
if (!hrgn) hrgn = CreateRectRgn( 0, 0, 0, 0 );
GetClipRgn( HDC_32(hdc), hrgn );
return HRGN_16(hrgn);
}