diff --git a/reactos/subsystems/win32/win32k/objects/stockobj.c b/reactos/subsystems/win32/win32k/objects/stockobj.c index 260a229ea03..bdc125ae749 100644 --- a/reactos/subsystems/win32/win32k/objects/stockobj.c +++ b/reactos/subsystems/win32/win32k/objects/stockobj.c @@ -107,7 +107,10 @@ static LOGFONTW DefaultGuiFont = { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif" }; //Bitstream Vera Sans -#define NB_STOCK_OBJECTS (STOCK_LAST + 1) +/* Comments from wine reserve two extra entry for the stock default bitmap this is what Windows does too + * and verify if it it is true it is not. in XP/2003 it is 22 stockobjects for each bitmap + */ +#define NB_STOCK_OBJECTS (STOCK_LAST + 3) static HGDIOBJ StockObjects[NB_STOCK_OBJECTS]; @@ -136,6 +139,8 @@ CreateStockObjects(void) StockObjects[DC_PEN] = IntGdiExtCreatePen(BlackPen.lopnStyle, BlackPen.lopnWidth.x, BS_SOLID, BlackPen.lopnColor, 0, 0, 0, NULL, 0, TRUE, NULL); StockObjects[NULL_PEN] = IntGdiExtCreatePen(NullPen.lopnStyle, NullPen.lopnWidth.x, BS_SOLID, NullPen.lopnColor, 0, 0, 0, NULL, 0, TRUE, NULL); + StockObjects[DC_BITMAP] = IntGdiCreateBitmap (1, 1, 1, 1, NULL); + (void) TextIntCreateFontIndirect(&OEMFixedFont, (HFONT*)&StockObjects[OEM_FIXED_FONT]); (void) TextIntCreateFontIndirect(&AnsiFixedFont, (HFONT*)&StockObjects[ANSI_FIXED_FONT]); (void) TextIntCreateFontIndirect(&SystemFont, (HFONT*)&StockObjects[SYSTEM_FONT]);