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
65b7eb26
Commit
65b7eb26
authored
Dec 16, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Add some more tests for ImageList_Write.
parent
332eee40
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
imagelist.c
dlls/comctl32/imagelist.c
+5
-9
imagelist.c
dlls/comctl32/tests/imagelist.c
+0
-0
No files found.
dlls/comctl32/imagelist.c
View file @
65b7eb26
...
...
@@ -798,7 +798,10 @@ ImageList_Create (INT cx, INT cy, UINT flags,
/* Default to ILC_COLOR4 if none of the ILC_COLOR* flags are specified */
if
(
ilc
==
ILC_COLOR
)
{
ilc
=
ILC_COLOR4
;
himl
->
flags
|=
ILC_COLOR4
;
}
if
(
ilc
>=
ILC_COLOR4
&&
ilc
<=
ILC_COLOR32
)
himl
->
uBitsPixel
=
ilc
;
...
...
@@ -2993,11 +2996,11 @@ _write_bitmap(HBITMAP hBitmap, LPSTREAM pstm)
if
(
!
GetObjectW
(
hBitmap
,
sizeof
(
BITMAP
),
&
bm
))
return
FALSE
;
bitCount
=
bm
.
bmBitsPixel
==
1
?
1
:
24
;
bitCount
=
bm
.
bmBitsPixel
;
sizeImage
=
get_dib_stride
(
bm
.
bmWidth
,
bitCount
)
*
bm
.
bmHeight
;
totalSize
=
sizeof
(
BITMAPFILEHEADER
)
+
sizeof
(
BITMAPINFOHEADER
);
if
(
bitCount
!=
24
)
if
(
bitCount
<=
8
)
totalSize
+=
(
1
<<
bitCount
)
*
sizeof
(
RGBQUAD
);
offBits
=
totalSize
;
totalSize
+=
sizeImage
;
...
...
@@ -3037,13 +3040,6 @@ _write_bitmap(HBITMAP hBitmap, LPSTREAM pstm)
bmih
->
biWidth
,
bmih
->
biHeight
,
bmih
->
biPlanes
,
bmih
->
biBitCount
);
if
(
bitCount
==
1
)
{
/* Hack. */
LPBITMAPINFO
inf
=
(
LPBITMAPINFO
)
bmih
;
inf
->
bmiColors
[
0
].
rgbRed
=
inf
->
bmiColors
[
0
].
rgbGreen
=
inf
->
bmiColors
[
0
].
rgbBlue
=
0
;
inf
->
bmiColors
[
1
].
rgbRed
=
inf
->
bmiColors
[
1
].
rgbGreen
=
inf
->
bmiColors
[
1
].
rgbBlue
=
0xff
;
}
if
(
FAILED
(
IStream_Write
(
pstm
,
data
,
totalSize
,
NULL
)))
goto
failed
;
...
...
dlls/comctl32/tests/imagelist.c
View file @
65b7eb26
This diff is collapsed.
Click to expand it.
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