143{
145 BITMAPINFO bmi1 = {{
sizeof(
BITMAPINFOHEADER), 8, 1, 1, 1,
BI_RGB, 0, 10, 10, 0,0}};
146 BITMAPINFO bmi32 = {{
sizeof(
BITMAPINFOHEADER), 8, 1, 1, 16,
BI_RGB, 0, 10, 10, 0,0}};
147 HBITMAP hbmDst, hbmSrc, hbmMsk;
149 PUSHORT pusBitsDst, pusBitsSrc;
151
152
156
157
162
163
165 ok(hbmMsk != 0,
"CreateDIBSection failed\n");
166
167
168 pusBitsDst[0] = 0x1234;
169 pusBitsDst[1] = 0x5678;
170 pusBitsSrc[0] = 0x4321;
171 pusBitsSrc[1] = 0x8765;
172 pjBitsMsk[0] = 0x80;
174 ret =
MaskBlt(
hdcDst, 0, 0, 8, 1,
hdcSrc, 0, 0, hbmMsk, 0, 0,
MAKEROP4(
SRCCOPY, 0xAA0000));
176 ok(
ret == 1,
"MaskBlt failed (%d)\n",
ret);
177 ok (pusBitsDst[0] == 0x4321,
"pusBitsDst[0] == 0x%x\n", pusBitsDst[0]);
178 ok (pusBitsDst[1] == 0x5678,
"pusBitsDst[0] == 0x%x\n", pusBitsDst[1]);
179
180 pusBitsDst[0] = 0x1234;
181 pusBitsDst[1] = 0x5678;
183 ret =
MaskBlt(
hdcDst, 0, 0, 8, 1,
hdcSrc, 0, 0, hbmMsk, 0, 0,
MAKEROP4(
SRCPAINT,
MERGEPAINT));
185 ok(
ret == 1,
"MaskBlt failed (%d)\n",
ret);
186 ok (pusBitsDst[0] == 0x5335,
"pusBitsDst[0] == 0x%x\n", pusBitsDst[0]);
187 ok (pusBitsDst[1] == 0x7efa,
"pusBitsDst[0] == 0x%x\n", pusBitsDst[1]);
188}
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI MaskBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ HDC, _In_ int, _In_ int, _In_ HBITMAP, _In_ int, _In_ int, _In_ DWORD)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)