DC_GRADIENT and DC_BUTTONS

"Silver Blade" <lists-JCKMKWeByS2j5a8ZAWZ3aFpr/1R2p/[email protected]> Tue, 19 Aug 2003 18:11:58 +0100
Newsgroups gmane.comp.gnu.mingw.patches
Message-ID <01ac01c36675$016a8230$0400a8c0@mercury>
I noticed that, for some time it seems, a couple of flags for DrawCaption()
are missing.

DC_GRADIENT causes a gradient caption to be drawn (Win 98/2000 +), and
DC_BUTTONS causes the window title buttons to be drawn (XP +).

At the moment, I am running Windows 2000, so I am unable to verify if
DC_BUTTONS works or not. However, I guessed correctly for DC_GRADIENT (32),
and I'm pretty sure that DC_BUTTONS should be 64, since there aren't any
other documented flags than the ones listed.

I've also added DC_GRADIENT to the end of the DC_CAPTION style.

Changelog entry:

2003-08-19  Andrew Greenwood  <lists-JCKMKWeByS2j5a8ZAWZ3aFpr/1R2p/[email protected]>

        * include/winuser.h (DC_*): Add DC_GRADIENT and DC_BUTTONS
definitions, and add DC_GRADIENT to DC_CAPTION.


Patch: (also attached)

Index: winuser.h
===================================================================
RCS file: /cvs/src/src/winsup/w32api/include/winuser.h,v
retrieving revision 1.46
diff -u -r1.46 winuser.h
--- winuser.h 18 Aug 2003 09:43:24 -0000 1.46
+++ winuser.h 19 Aug 2003 16:53:51 -0000
@@ -381,7 +381,9 @@
 #define DC_ICON 4
 #define DC_TEXT 8
 #define DC_INBUTTON 16
-#define DC_CAPTION (DC_ICON|DC_TEXT|DC_BUTTONS)
+#define DC_GRADIENT 32
+#define DC_BUTTONS 64
+#define DC_CAPTION (DC_ICON|DC_TEXT|DC_BUTTONS|DC_GRADIENT)
 #define DC_NC (DC_CAPTION|DC_FRAME)
 #define BDR_RAISEDOUTER 1
 #define BDR_SUNKENOUTER 2
winuser DC_.patch (application/octet-stream, 609 B)
Index: winuser.h
===================================================================
RCS file: /cvs/src/src/winsup/w32api/include/winuser.h,v
retrieving revision 1.46
diff -u -r1.46 winuser.h
--- winuser.h	18 Aug 2003 09:43:24 -0000	1.46
+++ winuser.h	19 Aug 2003 16:53:51 -0000
@@ -381,7 +381,9 @@
 #define DC_ICON	4
 #define DC_TEXT	8
 #define DC_INBUTTON	16
-#define DC_CAPTION	(DC_ICON|DC_TEXT|DC_BUTTONS)
+#define DC_GRADIENT 32
+#define DC_BUTTONS 64
+#define DC_CAPTION	(DC_ICON|DC_TEXT|DC_BUTTONS|DC_GRADIENT)
 #define DC_NC	(DC_CAPTION|DC_FRAME)
 #define BDR_RAISEDOUTER	1
 #define BDR_SUNKENOUTER	2