Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f09deaca
Commit
f09deaca
authored
Jan 23, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Add a helper to replace macro.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
056ce0e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
imagelist.c
dlls/comctl32/tests/imagelist.c
+15
-12
No files found.
dlls/comctl32/tests/imagelist.c
View file @
f09deaca
...
...
@@ -1029,12 +1029,22 @@ static void check_iml_data(HIMAGELIST himl, INT cx, INT cy, INT cur, INT max, IN
cleanup_memstream
(
&
stream
);
}
static
void
image_list_
init
(
HIMAGELIST
himl
)
static
void
image_list_
add_bitmap
(
HIMAGELIST
himl
,
BYTE
grey
,
int
i
)
{
HBITMAP
hbm
;
char
comment
[
16
];
INT
n
=
1
;
DWORD
i
;
HBITMAP
hbm
;
int
ret
;
sprintf
(
comment
,
"%d"
,
i
);
hbm
=
create_bitmap
(
BMP_CX
,
BMP_CX
,
RGB
(
grey
,
grey
,
grey
),
comment
);
ret
=
pImageList_Add
(
himl
,
hbm
,
NULL
);
ok
(
ret
!=
-
1
,
"Failed to add image to imagelist.
\n
"
);
DeleteObject
(
hbm
);
}
static
void
image_list_init
(
HIMAGELIST
himl
)
{
unsigned
int
i
;
static
const
struct
test_data
{
BYTE
grey
;
...
...
@@ -1070,18 +1080,11 @@ static void image_list_init(HIMAGELIST himl)
check_iml_data
(
himl
,
BMP_CX
,
BMP_CX
,
0
,
2
,
4
,
ILC_COLOR24
,
"total 0"
);
#define add_bitmap(grey) \
sprintf(comment, "%d", n++); \
hbm = create_bitmap(BMP_CX, BMP_CX, RGB((grey),(grey),(grey)), comment); \
ImageList_Add(himl, hbm, NULL); \
DeleteObject(hbm);
for
(
i
=
0
;
i
<
sizeof
(
td
)
/
sizeof
(
td
[
0
]);
i
++
)
{
add_bitmap
(
td
[
i
].
grey
);
image_list_add_bitmap
(
himl
,
td
[
i
].
grey
,
i
+
1
);
check_iml_data
(
himl
,
td
[
i
].
cx
,
td
[
i
].
cy
,
td
[
i
].
cur
,
td
[
i
].
max
,
td
[
i
].
grow
,
td
[
i
].
bpp
,
td
[
i
].
comment
);
}
#undef add_bitmap
}
static
void
test_imagelist_storage
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment