On 30 Oct 2000, Alexandre Julliard wrote:

> Francois Gouget <[EMAIL PROTECTED]> writes:
> 
> >    Finally the focus rectangle is not drawn in xor mode (in Win9x at
> > least). 
> 
> Are you sure about that?  The doc explicitly states that it does a xor
> (and all callers inside Wine rely on this).

   Maybe what it does is select COLOR_WINDOW for the pen before drawing.
This way the dots are always black.
   I did some experiments to test this theory on Windows. I tried
various combinations of color for the text and the background. Here are
the results: 
 * no matter what colors I chose for the text and/or bacground the dots
were always black.
 * for some combinations of colors, the spaces between the dots were of
a third color.  This proves (if there was any doubt) that Windows is
using some sore of XOR. But I was not able to determine which color was
used for them.


So maybe this would be more correct (why WINDOWTEXT rather than
BTNTEXT? WINDOW certainly does not work but is BTNFACE more correct?)

Index: windows/painting.c
===================================================================
RCS file: /home/wine/wine/windows/painting.c,v
retrieving revision 1.40
diff -u -r1.40 painting.c
--- windows/painting.c  2000/10/29 01:22:15     1.40
+++ windows/painting.c  2000/10/31 08:08:19
@@ -1355,7 +1356,7 @@
     INT oldDrawMode, oldBkMode;
 
     hOldBrush = SelectObject(hdc, GetStockObject(NULL_BRUSH));
-    hNewPen = CreatePen(PS_DOT, 1, GetSysColor(COLOR_WINDOWTEXT));
+    hNewPen = CreatePen(PS_DOT, 1, GetSysColor(COLOR_BTNFACE));
     hOldPen = SelectObject(hdc, hNewPen);
     oldDrawMode = SetROP2(hdc, R2_XORPEN);
     oldBkMode = SetBkMode(hdc, TRANSPARENT);


--
Francois Gouget         [EMAIL PROTECTED]        http://fgouget.free.fr/
                         "Utilisateur" (nom commun) :
        Mot utilis� par les informaticiens en lieu et place d'"idiot".


Reply via email to