ReactOS 0.4.15-dev-7924-g5949c20
CreateBitmapIndirect.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS api tests
3 * LICENSE: GPL - See COPYING in the top level directory
4 * PURPOSE: Test for CreateBitmapIndirect
5 * PROGRAMMERS: Magnus Olsen
6 */
7
8#include "precomp.h"
9
11{
12 HBITMAP win_hBmp;
13 BITMAP win_bitmap;
14
15 win_bitmap.bmBits = 0;
16 win_bitmap.bmBitsPixel = 1;
17 win_bitmap.bmHeight = 0;
18 win_bitmap.bmPlanes = 1;
19 win_bitmap.bmType = 1;
20 win_bitmap.bmWidth = 0;
21 win_bitmap.bmWidthBytes = 2;
22 win_hBmp = CreateBitmapIndirect(&win_bitmap);
23 ok(win_hBmp != 0, "CreateBitmapIndirect failed\n");
24
25 DeleteObject(win_hBmp);
26
27 RtlZeroMemory(&win_bitmap,sizeof(BITMAP));
28 win_bitmap.bmBits = 0;
29 win_bitmap.bmBitsPixel = 1;
30 win_bitmap.bmHeight = 0;
31 win_bitmap.bmPlanes = 1;
32 win_bitmap.bmType = 1;
33 win_bitmap.bmWidth = 0;
34 win_bitmap.bmWidthBytes = 1;
35 win_hBmp = CreateBitmapIndirect(&win_bitmap);
36 ok(win_hBmp == 0, "CreateBitmapIndirect succeeded\n");
37
38 RtlZeroMemory(&win_bitmap,sizeof(BITMAP));
39 win_bitmap.bmBits = 0;
40 win_bitmap.bmBitsPixel = 1;
41 win_bitmap.bmHeight = 0;
42 win_bitmap.bmPlanes = 1;
43 win_bitmap.bmType = 1;
44 win_bitmap.bmWidth = 0;
45 win_bitmap.bmWidthBytes = 3;
46 win_hBmp = CreateBitmapIndirect(&win_bitmap);
47 ok(win_hBmp == 0, "CreateBitmapIndirect succeeded\n");
48
49 RtlZeroMemory(&win_bitmap,sizeof(BITMAP));
50 win_bitmap.bmBits = 0;
51 win_bitmap.bmBitsPixel = 1;
52 win_bitmap.bmHeight = 0;
53 win_bitmap.bmPlanes = 1;
54 win_bitmap.bmType = 1;
55 win_bitmap.bmWidth = 0;
56 win_bitmap.bmWidthBytes = 4;
57 win_hBmp = CreateBitmapIndirect(&win_bitmap);
58 ok(win_hBmp != 0, "CreateBitmapIndirect failed\n");
59
60 RtlZeroMemory(&win_bitmap,sizeof(BITMAP));
61 win_bitmap.bmBits = 0;
62 win_bitmap.bmBitsPixel = 8;
63 win_bitmap.bmHeight = 0xF000;
64 win_bitmap.bmPlanes = 1;
65 win_bitmap.bmType = 1;
66 win_bitmap.bmWidth = 0x8000;
67 win_bitmap.bmWidthBytes = win_bitmap.bmWidth;
68 win_hBmp = CreateBitmapIndirect(&win_bitmap);
69 //ok(win_hBmp != 0, "CreateBitmapIndirect failed\n"); // fails on win 2003
70
71 DeleteObject(win_hBmp);
72}
73
75{
77}
78
void Test_CreateBitmapIndirect()
#define ok(value,...)
Definition: atltest.h:57
#define START_TEST(x)
Definition: atltest.h:75
pKey DeleteObject()
static HBITMAP
Definition: button.c:44
Definition: bl.h:1331
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
HBITMAP WINAPI CreateBitmapIndirect(_In_ const BITMAP *pbm)