Author: jimtabor
Date: Sat Nov 3 01:14:45 2007
New Revision: 30075
URL:
http://svn.reactos.org/svn/reactos?rev=30075&view=rev
Log:
Add STOCK_LAST, update stock objects.
Modified:
trunk/reactos/dll/win32/gdi32/include/gdi32p.h
trunk/reactos/include/psdk/wingdi.h
trunk/reactos/subsystems/win32/win32k/objects/stockobj.c
Modified: trunk/reactos/dll/win32/gdi32/include/gdi32p.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/include/gd…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/include/gdi32p.h (original)
+++ trunk/reactos/dll/win32/gdi32/include/gdi32p.h Sat Nov 3 01:14:45 2007
@@ -28,7 +28,6 @@
#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)
Modified: trunk/reactos/include/psdk/wingdi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wingdi.h?rev=…
==============================================================================
--- trunk/reactos/include/psdk/wingdi.h (original)
+++ trunk/reactos/include/psdk/wingdi.h Sat Nov 3 01:14:45 2007
@@ -815,6 +815,13 @@
#if (_WIN32_WINNT >= 0x0500)
#define DC_BRUSH 18
#define DC_PEN 19
+#endif
+#if (_WIN32_WINNT >= 0x0500)
+#define STOCK_LAST 19
+#elif (WINVER >= 0x0400)
+#define STOCK_LAST 17
+#else
+#define STOCK_LAST 16
#endif
#define SYSPAL_NOSTATIC 2
#define SYSPAL_STATIC 1
Modified: trunk/reactos/subsystems/win32/win32k/objects/stockobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/stockobj.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/stockobj.c Sat Nov 3 01:14:45 2007
@@ -107,7 +107,7 @@
{ 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 (DEFAULT_GUI_FONT + 1)
+#define NB_STOCK_OBJECTS (STOCK_LAST + 1)
static HGDIOBJ StockObjects[NB_STOCK_OBJECTS];
@@ -124,6 +124,7 @@
/* Create GDI Stock Objects from the logical structures we've defined */
StockObjects[WHITE_BRUSH] = IntGdiCreateSolidBrush(RGB(255,255,255));
+ StockObjects[DC_BRUSH] = IntGdiCreateSolidBrush(RGB(255,255,255));
StockObjects[LTGRAY_BRUSH] = IntGdiCreateSolidBrush(RGB(192,192,192));
StockObjects[GRAY_BRUSH] = IntGdiCreateSolidBrush(RGB(128,128,128));
StockObjects[DKGRAY_BRUSH] = IntGdiCreateSolidBrush(RGB(64,64,64));
@@ -132,6 +133,7 @@
StockObjects[WHITE_PEN] = IntGdiExtCreatePen(WhitePen.lopnStyle, WhitePen.lopnWidth.x,
BS_SOLID, WhitePen.lopnColor, 0, 0, 0, NULL, 0, TRUE, NULL);
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);
(void) TextIntCreateFontIndirect(&OEMFixedFont,
(HFONT*)&StockObjects[OEM_FIXED_FONT]);