2 Test_SetDCPenColor(PTESTINFO pti
)
6 // Test an incorrect DC
7 RTEST(SetDCPenColor(0, RGB(0,0,0)) == CLR_INVALID
);
10 hScreenDC
= GetDC(NULL
);
11 if (hScreenDC
== NULL
) return FALSE
;
14 SetDCPenColor(hScreenDC
, RGB(1,2,3));
15 TEST(SetDCPenColor(hScreenDC
, RGB(4,5,6)) == RGB(1,2,3));
18 hDC
= CreateCompatibleDC(hScreenDC
);
19 ReleaseDC(0, hScreenDC
);
25 // Select the DC_PEN and check if the pen returned by a new call is DC_PEN
26 SelectObject(hDC
, GetStockObject(DC_PEN
));
27 TEST(SelectObject(hDC
, GetStockObject(BLACK_PEN
)) == GetStockObject(DC_PEN
));
29 // Test an incorrect color, yes windows sets the color!
30 SetDCPenColor(hDC
, 0x21123456);
31 TEST(SetDCPenColor(hDC
, RGB(0,0,0)) == 0x21123456);
33 // Test CLR_INVALID, it sets CLR_INVALID!
34 SetDCPenColor(hDC
, CLR_INVALID
);
35 RTEST(SetDCPenColor(hDC
, RGB(0,0,0)) == CLR_INVALID
);
40 return APISTATUS_NORMAL
;