34 ok(
hbmp == 0,
"CreateBitmap should fail\n");
39 ok(
hbmp == 0,
"CreateBitmap should fail\n");
44 ok(
hbmp == 0,
"CreateBitmap should fail\n");
49 ok(
hbmp == 0,
"CreateBitmap should fail\n");
55 ok(
hbmp == 0,
"CreateBitmap should fail\n");
60 ok(
hbmp != 0,
"CreateBitmap failed\n");
65 ok(
hbmp == 0,
"CreateBitmap should fail\n");
75 ok(
hbmp == 0,
"CreateBitmap should fail\n");
80 ok(
hbmp == 0,
"CreateBitmap should fail\n");
86 ok(
hbmp == 0,
"CreateBitmap should fail\n");
91 ok(
hbmp != 0,
"CreateBitmap failed\n");
94 ok(
hbmp != 0,
"CreateBitmap failed\n");
99 ok(
hbmp == 0,
"CreateBitmap should fail\n");
104 ok(
hbmp == 0,
"CreateBitmap should fail\n");
109 ok(
hbmp == 0,
"CreateBitmap should fail\n");
114 ok(
hbmp == 0,
"CreateBitmap should fail\n");
123 ULONG cjWidthBytes, cBitsPixel, cExpectedBitsPixel;
126 ok(
hbmp != 0,
"should get a 1x1 bitmap\n");
140 ok(
hbmp == 0,
"should fail\n");
143 ok(
hbmp != 0,
"should get a 1x2 bitmap\n");
154 for (cBitsPixel = 0; cBitsPixel <= 32; cBitsPixel++)
158 if (cBitsPixel <= 1) cExpectedBitsPixel = 1;
159 else if (cBitsPixel <= 4) cExpectedBitsPixel = 4;
160 else if (cBitsPixel <= 8) cExpectedBitsPixel = 8;
161 else if (cBitsPixel <= 16) cExpectedBitsPixel = 16;
162 else if (cBitsPixel <= 24) cExpectedBitsPixel = 24;
163 else if (cBitsPixel <= 32) cExpectedBitsPixel = 32;
166 ok(
hbmp != 0,
"should get a 1x2 bitmap %ld\n", cBitsPixel);
170 cjWidthBytes = ((
bitmap.bmWidth *
bitmap.bmBitsPixel + 15) & ~15) >> 3;
183 ok(
hbmp == 0,
"Expected failure for 33 bpp\n");
188 static const WORD pattern_bits[] = { 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa };
194 ok(
hbmp != 0,
"should get a 1x1 bitmap\n");
225 ok(
hbmp != 0,
"should get a pattern bitmap\n");
229 ok(hbmpso != 0,
"should get stock pattern bitmap\n");
235 ok(
ret ==
sizeof(bm),
"GetObject returned %d\n",
ret);
238 ok(hbmpsoc != 0,
"should get pattern bitmap\n");
244 ok(
ret == 0,
"GetObject returned %d\n",
ret);
DWORD WINAPI GetBitmapAttributes(HBITMAP hbm)
void Test_CreateBitmap_Params()
void Test_BitmapAttributes()
HBITMAP WINAPI SetBitmapAttributes(HBITMAP hbm, DWORD dwFlags)
HBITMAP WINAPI ClearBitmapAttributes(HBITMAP hbm, DWORD dwFlags)
#define ok_int(expression, result)
#define ok_ptr(expression, result)
#define ERROR_INVALID_PARAMETER
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)