From 0bbce9519c84758a85563d16bc98286108cccad5 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Wed, 1 Apr 2009 02:02:21 +0000 Subject: [PATCH] Add one more test for SetDCPenColor svn path=/trunk/; revision=40307 --- rostests/apitests/gdi32api/tests/SetDCPenColor.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/rostests/apitests/gdi32api/tests/SetDCPenColor.c b/rostests/apitests/gdi32api/tests/SetDCPenColor.c index 32cc26a124c..d69b3dffa0c 100644 --- a/rostests/apitests/gdi32api/tests/SetDCPenColor.c +++ b/rostests/apitests/gdi32api/tests/SetDCPenColor.c @@ -2,6 +2,7 @@ INT Test_SetDCPenColor(PTESTINFO pti) { HDC hScreenDC, hDC; + HBITMAP hbmp; // Test an incorrect DC SetLastError(ERROR_SUCCESS); @@ -33,6 +34,16 @@ Test_SetDCPenColor(PTESTINFO pti) SetDCPenColor(hDC, CLR_INVALID); RTEST(SetDCPenColor(hDC, RGB(0,0,0)) == CLR_INVALID); + hbmp = CreateBitmap(10, 10, 1, 32, NULL); + ASSERT(hbmp); + + SelectObject(hDC, hbmp); + SelectObject(hDC, GetStockObject(DC_PEN)); + SetDCPenColor(hDC, 0x123456); + MoveToEx(hDC, 0, 0, NULL); + LineTo(hDC, 10, 0); + TEST(GetPixel(hDC, 5, 0) == 0x123456); + // Delete the DC DeleteDC(hDC);