Bug fixed in drawing lines: repalced PS_ENDCAP_SQUARE with PS_SOLID.

PS_ENDCAP_SQUARE is not supported by WindowsCE.
Thanks to Bruno for finding the problem and testing it on his device.