Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void test1(void)
- {
- BITMAPINFO bitmap_info =
- {
- .bmiHeader.biSize = sizeof(BITMAPINFO),
- .bmiHeader.biWidth = 32,
- .bmiHeader.biHeight = 1,
- .bmiHeader.biPlanes = 1,
- .bmiHeader.biBitCount = 1,
- };
- unsigned char bitmap_data[4] = {1, 2, 3, 4};
- unsigned char bitmap_data_out[4] = {0};
- HDC dc = CreateCompatibleDC(0);
- HBITMAP bitmap = CreateBitmap(32, 1, 1, 1, NULL);
- SetDIBits(dc, bitmap, 0, 1, bitmap_data, &bitmap_info, DIB_RGB_COLORS);
- GetDIBits(dc, bitmap, 0, 1, bitmap_data_out, &bitmap_info, DIB_RGB_COLORS);
- ok(memcmp(bitmap_data_out, bitmap_data, 4) == 0, "Got %x %x %x %x\n", bitmap_data_out[0], bitmap_data_out[1], bitmap_data_out[2], bitmap_data_out[3]);
- DeleteObject(bitmap);
- DeleteDC(dc);
- }
Advertisement
Add Comment
Please, Sign In to add comment