2010-08-24 13:54:10 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS api tests
|
|
|
|
* LICENSE: GPL - See COPYING in the top level directory
|
|
|
|
* PURPOSE: Test for CreateBitmapIndirect
|
|
|
|
* PROGRAMMERS: Magnus Olsen
|
|
|
|
*/
|
2008-05-11 10:35:09 +00:00
|
|
|
|
2010-08-24 13:54:10 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <wine/test.h>
|
|
|
|
#include <windows.h>
|
2008-05-11 10:35:09 +00:00
|
|
|
|
2010-08-24 13:54:10 +00:00
|
|
|
void Test_CreateBitmapIndirect()
|
2008-05-11 10:35:09 +00:00
|
|
|
{
|
|
|
|
HBITMAP win_hBmp;
|
|
|
|
BITMAP win_bitmap;
|
|
|
|
|
|
|
|
win_bitmap.bmBits = 0;
|
|
|
|
win_bitmap.bmBitsPixel = 1;
|
|
|
|
win_bitmap.bmHeight = 0;
|
|
|
|
win_bitmap.bmPlanes = 1;
|
|
|
|
win_bitmap.bmType = 1;
|
|
|
|
win_bitmap.bmWidth = 0;
|
|
|
|
win_bitmap.bmWidthBytes = 2;
|
|
|
|
win_hBmp = CreateBitmapIndirect(&win_bitmap);
|
2010-08-24 13:54:10 +00:00
|
|
|
ok(win_hBmp != 0, "CreateBitmapIndirect failed\n");
|
2008-05-11 10:35:09 +00:00
|
|
|
|
|
|
|
DeleteObject(win_hBmp);
|
|
|
|
|
|
|
|
RtlZeroMemory(&win_bitmap,sizeof(BITMAP));
|
|
|
|
win_bitmap.bmBits = 0;
|
|
|
|
win_bitmap.bmBitsPixel = 1;
|
|
|
|
win_bitmap.bmHeight = 0;
|
|
|
|
win_bitmap.bmPlanes = 1;
|
|
|
|
win_bitmap.bmType = 1;
|
|
|
|
win_bitmap.bmWidth = 0;
|
|
|
|
win_bitmap.bmWidthBytes = 1;
|
|
|
|
win_hBmp = CreateBitmapIndirect(&win_bitmap);
|
2010-08-24 13:54:10 +00:00
|
|
|
ok(win_hBmp == 0, "CreateBitmapIndirect succeeded\n");
|
2008-05-11 10:35:09 +00:00
|
|
|
|
|
|
|
RtlZeroMemory(&win_bitmap,sizeof(BITMAP));
|
|
|
|
win_bitmap.bmBits = 0;
|
|
|
|
win_bitmap.bmBitsPixel = 1;
|
|
|
|
win_bitmap.bmHeight = 0;
|
|
|
|
win_bitmap.bmPlanes = 1;
|
|
|
|
win_bitmap.bmType = 1;
|
|
|
|
win_bitmap.bmWidth = 0;
|
|
|
|
win_bitmap.bmWidthBytes = 3;
|
|
|
|
win_hBmp = CreateBitmapIndirect(&win_bitmap);
|
2010-08-24 13:54:10 +00:00
|
|
|
ok(win_hBmp == 0, "CreateBitmapIndirect succeeded\n");
|
2008-05-11 10:35:09 +00:00
|
|
|
|
|
|
|
RtlZeroMemory(&win_bitmap,sizeof(BITMAP));
|
|
|
|
win_bitmap.bmBits = 0;
|
|
|
|
win_bitmap.bmBitsPixel = 1;
|
|
|
|
win_bitmap.bmHeight = 0;
|
|
|
|
win_bitmap.bmPlanes = 1;
|
|
|
|
win_bitmap.bmType = 1;
|
|
|
|
win_bitmap.bmWidth = 0;
|
|
|
|
win_bitmap.bmWidthBytes = 4;
|
|
|
|
win_hBmp = CreateBitmapIndirect(&win_bitmap);
|
2010-08-24 13:54:10 +00:00
|
|
|
ok(win_hBmp != 0, "CreateBitmapIndirect failed\n");
|
2008-05-11 10:35:09 +00:00
|
|
|
|
2011-01-16 20:53:48 +00:00
|
|
|
RtlZeroMemory(&win_bitmap,sizeof(BITMAP));
|
|
|
|
win_bitmap.bmBits = 0;
|
|
|
|
win_bitmap.bmBitsPixel = 8;
|
|
|
|
win_bitmap.bmHeight = 0xF000;
|
|
|
|
win_bitmap.bmPlanes = 1;
|
|
|
|
win_bitmap.bmType = 1;
|
|
|
|
win_bitmap.bmWidth = 0x8000;
|
|
|
|
win_bitmap.bmWidthBytes = win_bitmap.bmWidth;
|
|
|
|
win_hBmp = CreateBitmapIndirect(&win_bitmap);
|
|
|
|
ok(win_hBmp != 0, "CreateBitmapIndirect failed\n");
|
|
|
|
|
2008-05-11 10:35:09 +00:00
|
|
|
DeleteObject(win_hBmp);
|
2010-08-24 13:54:10 +00:00
|
|
|
}
|
2008-05-11 10:35:09 +00:00
|
|
|
|
2010-08-24 13:54:10 +00:00
|
|
|
START_TEST(CreateBitmapIndirect)
|
|
|
|
{
|
|
|
|
Test_CreateBitmapIndirect();
|
2008-05-11 10:35:09 +00:00
|
|
|
}
|
2010-08-24 13:54:10 +00:00
|
|
|
|