Horizontal and vertical lines are drawn incorrectly in WinCE6

Gleb
I use mini6410 with 7" LCD. WinCE image from DVD. I got the following
problem. Line width of 1 pixel display is not in the specified color, and
the resulting logical OR operation with the background color.The lines at
an angle and thicker drawn correctly. For example, on a blue background (0x
00 00 FF) draw a horizontal green line (0x 00 FF 00), we obtain a line of
color 0x 00 FF FF. ie on a white background I cannot draw lines, and black
lines are not visible on any background.
For drawing I use a function MFC: CDC:: LineTo, CDC:: Polyline.
The lines begin to appear correctly in two cases.
1. If you move the window so that the lines crossed the edge of the screen.
2. If one part of the window was covered "Start" menu, or menu selection
virtual keyboard.
Please tell me the solution to this problem.