21{
22 struct
23 {
27 } PackedDIB =
28 {
29 {
sizeof(
BITMAPINFOHEADER), 4, -4, 1, 8,
BI_RGB, 0, 1, 1, 4, 0},
30 {0, 1, 2, 7},
31 {0,1,2,3, 1,2,3,0, 2,3,0,1, 3,0,1,2},
32 };
33 HBRUSH hbr, hbrOld;
34 HPALETTE hpalOld;
36
43
45 ok(hbr != 0,
"Expected success\n");
48 ok(hbr != 0,
"Expected success\n");
50
53 ok(hbr == 0,
"Expected failure\n");
57 ok(hbr == 0,
"Expected failure\n");
59
60
62 ok(hbr != 0,
"CreateDIBPatternBrushPt failed, skipping tests.\n");
63 if (!hbr) return;
64
65
66 ok(
GetObject(hbr,
sizeof(logbrush), &logbrush),
"GetObject() failed\n");
70 "invalid lbHatch. Got %p, expected %p\n", (
PVOID)logbrush.
lbHatch, &PackedDIB);
71
72
74
75
81
82
85
86
92
93
96
97
103
106
107
108 PackedDIB.ajBuffer[0] = 3;
109 PackedDIB.ajBuffer[1] = 2;
110 PackedDIB.ajBuffer[2] = 1;
111 PackedDIB.ajBuffer[3] = 0;
112
113
115 ok(hbr != 0,
"CreateSolidBrush failed, skipping tests.\n");
116 if (!hbr) return;
117
118
119 ok(
GetObject(hbr,
sizeof(logbrush), &logbrush),
"GetObject() failed\n");
123 "invalid lbHatch. Got %p, expected %p\n", (
PVOID)logbrush.
lbHatch, &PackedDIB);
124
125
127 ok(hbrOld != 0,
"CreateSolidBrush failed, skipping tests.\n");
128
129
136
137
139 ok(hpalOld != 0,
"Expected success, error %ld\n",
GetLastError());
140
141
147
151
152}
#define ok_hex(expression, result)
#define ok_long(expression, result)
#define ok_int(expression, result)
#define ERROR_INVALID_PARAMETER
DWORD WINAPI GetLastError(void)
HPALETTE WINAPI SelectPalette(_In_ HDC, _In_ HPALETTE, _In_ BOOL)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
HBRUSH WINAPI CreateDIBPatternBrushPt(_In_ const VOID *pvPackedDIB, _In_ UINT uUsage)