Author: greatlrd Date: Sat May 10 12:39:38 2008 New Revision: 33412
URL: http://svn.reactos.org/svn/reactos?rev=33412&view=rev Log: implement DC_BITMAP for GetStockObject. it works for any apps want it. and using this undoc value testcase exists in w32knapi have been run in windows and reactos.
Modified: trunk/reactos/subsystems/win32/win32k/objects/stockobj.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/stockobj.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/stockobj.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/stockobj.c [iso-8859-1] Sat May 10 12:39:38 2008 @@ -107,7 +107,10 @@ { 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];
@@ -135,6 +138,8 @@ StockObjects[BLACK_PEN] = IntGdiExtCreatePen(BlackPen.lopnStyle, BlackPen.lopnWidth.x, BS_SOLID, BlackPen.lopnColor, 0, 0, 0, NULL, 0, TRUE, NULL); 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]);