reactos/rostests/apitests/gdi32api/tests/ExtCreatePen.c
Timo Kreuzer 58c6a293bc - make apitest.c into a static lib to be used by different tests
- add a gdi32 api test, based on the one in the win32 folder
- add a user32 api test
- change type of test functions to int
- implement a quick 'n dirty html api status output
- uncomment NtGdiTransormPoints in w32kdll.def
- add ASSERT1 macro (ASSERT is already used)
- include some more headers

svn path=/trunk/; revision=28169
2007-08-05 03:32:24 +00:00

32 lines
777 B
C

#include "../gdi32api.h"
INT
Test_ExtCreatePen(PTESTINFO pti)
{
HPEN hPen;
LOGBRUSH logbrush;
DWORD dwStyles[17] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17};
logbrush.lbStyle = BS_SOLID;
logbrush.lbColor = RGB(1,2,3);
logbrush.lbHatch = 0;
hPen = ExtCreatePen(PS_COSMETIC, 1,&logbrush, 0, 0);
if (!hPen) return FALSE;
/* Test if we have an EXTPEN */
TEST(GDI_HANDLE_GET_TYPE(hPen) == GDI_OBJECT_TYPE_EXTPEN);
DeleteObject(hPen);
/* test userstyles */
hPen = ExtCreatePen(PS_GEOMETRIC | PS_USERSTYLE, 5, &logbrush, 17, (CONST DWORD*)&dwStyles);
TEST(hPen == 0);
hPen = ExtCreatePen(PS_GEOMETRIC | PS_USERSTYLE, 5, &logbrush, 16, (CONST DWORD*)&dwStyles);
TEST(hPen != 0);
DeleteObject(hPen);
return APISTATUS_NORMAL;
}