mirror of
https://github.com/reactos/reactos.git
synced 2024-10-04 08:25:53 +00:00
Reimplement GetStockObject, based on Wine. It is bypassed in the def file. Init support code is not added yet.
svn path=/trunk/; revision=26442
This commit is contained in:
parent
cf933b1f2b
commit
7b205923df
|
@ -29,6 +29,10 @@ typedef INT
|
|||
#define METAFILE_MEMORY 1
|
||||
#define METAFILE_DISK 2
|
||||
|
||||
#define STOCK_LAST 19
|
||||
#define DEFAULT_BITMAP (STOCK_LAST+1)
|
||||
#define NB_STOCK_OBJECTS (STOCK_LAST+2)
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
// Based on wmfapi.h and Wine. This is the DC_ATTR for a MetaDC file.
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
HGDIOBJ stock_objects[NB_STOCK_OBJECTS]; // temp location.
|
||||
|
||||
HDC
|
||||
FASTCALL
|
||||
IntCreateDICW ( LPCWSTR lpwszDriver,
|
||||
|
@ -577,3 +579,28 @@ GetObjectType(
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
HGDIOBJ
|
||||
WINAPI
|
||||
GetStockObject(
|
||||
INT h
|
||||
)
|
||||
{
|
||||
HGDIOBJ Ret = NULL;
|
||||
if ((h < 0) || (h >= NB_STOCK_OBJECTS)) return Ret;
|
||||
Ret = stock_objects[h];
|
||||
if (!Ret)
|
||||
{
|
||||
HGDIOBJ Obj = NtGdiGetStockObject( h );
|
||||
|
||||
if (GdiIsHandleValid(Obj))
|
||||
{
|
||||
stock_objects[h] = Obj;
|
||||
return Obj;
|
||||
}// Returns Null anyway.
|
||||
}
|
||||
return Ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue