gdi32: Introduce NtGdiSelectPen.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2021-07-02 12:38:25 +02:00 committed by Alexandre Julliard
parent 8b8b43d5f3
commit 4dd693a7ea
1 changed files with 14 additions and 8 deletions

View File

@ -215,20 +215,16 @@ invalid:
} }
/*********************************************************************** /***********************************************************************
* PEN_SelectObject * NtGdiSelectPen (win32u.@)
*/ */
static HGDIOBJ PEN_SelectObject( HGDIOBJ handle, HDC hdc ) HGDIOBJ WINAPI NtGdiSelectPen( HDC hdc, HGDIOBJ handle )
{ {
PENOBJ *pen; PENOBJ *pen;
HGDIOBJ ret = 0; HGDIOBJ ret = 0;
DC *dc = get_dc_ptr( hdc );
WORD type; WORD type;
DC *dc;
if (!dc) if (!(dc = get_dc_ptr( hdc ))) return 0;
{
SetLastError( ERROR_INVALID_HANDLE );
return 0;
}
if ((pen = get_any_obj_ptr( handle, &type ))) if ((pen = get_any_obj_ptr( handle, &type )))
{ {
@ -268,6 +264,16 @@ static HGDIOBJ PEN_SelectObject( HGDIOBJ handle, HDC hdc )
return ret; return ret;
} }
/***********************************************************************
* PEN_SelectObject
*/
static HGDIOBJ PEN_SelectObject( HGDIOBJ handle, HDC hdc )
{
HGDIOBJ ret = NtGdiSelectPen( hdc, handle );
if (!ret) SetLastError( ERROR_INVALID_HANDLE );
return ret;
}
/*********************************************************************** /***********************************************************************
* PEN_DeleteObject * PEN_DeleteObject