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
92e999f3
Commit
92e999f3
authored
Nov 20, 2017
by
Huw Davies
Committed by
Alexandre Julliard
Nov 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Don't create a masked imagelist if CLR_NONE is specified.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ca1c64d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletion
+26
-1
imagelist.c
dlls/comctl32/imagelist.c
+2
-1
imagelist.c
dlls/comctl32/tests/imagelist.c
+24
-0
No files found.
dlls/comctl32/imagelist.c
View file @
92e999f3
...
...
@@ -2037,7 +2037,8 @@ ImageList_LoadImageW (HINSTANCE hi, LPCWSTR lpbmp, INT cx, INT cGrow,
nImageCount
=
dib
.
dsBm
.
bmWidth
/
cx
;
himl
=
ImageList_Create
(
cx
,
dib
.
dsBm
.
bmHeight
,
ILC_MASK
|
color
,
nImageCount
,
cGrow
);
if
(
clrMask
!=
CLR_NONE
)
color
|=
ILC_MASK
;
himl
=
ImageList_Create
(
cx
,
dib
.
dsBm
.
bmHeight
,
color
,
nImageCount
,
cGrow
);
if
(
!
himl
)
{
DeleteObject
(
handle
);
return
NULL
;
...
...
dlls/comctl32/tests/imagelist.c
View file @
92e999f3
...
...
@@ -39,6 +39,7 @@
#include "wine/test.h"
#include "v6util.h"
#include "resources.h"
#define IMAGELIST_MAGIC (('L' << 8) | 'I')
...
...
@@ -67,6 +68,7 @@ static HRESULT (WINAPI *pImageList_CoCreateInstance)(REFCLSID,const IUnknown *,
REFIID
,
void
**
);
static
HRESULT
(
WINAPI
*
pHIMAGELIST_QueryInterface
)(
HIMAGELIST
,
REFIID
,
void
**
);
static
int
(
WINAPI
*
pImageList_SetColorTable
)(
HIMAGELIST
,
int
,
int
,
RGBQUAD
*
);
static
DWORD
(
WINAPI
*
pImageList_GetFlags
)(
HIMAGELIST
);
static
HINSTANCE
hinst
;
...
...
@@ -2237,6 +2239,26 @@ static void test_copy(void)
ImageList_Destroy
(
src
);
}
static
void
test_loadimage
(
void
)
{
HIMAGELIST
list
;
DWORD
flags
;
list
=
ImageList_LoadImageW
(
hinst
,
MAKEINTRESOURCEW
(
IDB_BITMAP_128x15
),
16
,
1
,
CLR_DEFAULT
,
IMAGE_BITMAP
,
LR_CREATEDIBSECTION
);
ok
(
list
!=
NULL
,
"got %p
\n
"
,
list
);
flags
=
pImageList_GetFlags
(
list
);
ok
(
flags
==
(
ILC_COLOR4
|
ILC_MASK
),
"got %08x
\n
"
,
flags
);
ImageList_Destroy
(
list
);
list
=
ImageList_LoadImageW
(
hinst
,
MAKEINTRESOURCEW
(
IDB_BITMAP_128x15
),
16
,
1
,
CLR_NONE
,
IMAGE_BITMAP
,
LR_CREATEDIBSECTION
);
ok
(
list
!=
NULL
,
"got %p
\n
"
,
list
);
flags
=
pImageList_GetFlags
(
list
);
ok
(
flags
==
ILC_COLOR4
,
"got %08x
\n
"
,
flags
);
ImageList_Destroy
(
list
);
}
static
void
test_IImageList_Clone
(
void
)
{
IImageList
*
imgl
,
*
imgl2
;
...
...
@@ -2370,6 +2392,7 @@ START_TEST(imagelist)
pImageList_DrawIndirect
=
(
void
*
)
GetProcAddress
(
hComCtl32
,
"ImageList_DrawIndirect"
);
pImageList_SetImageCount
=
(
void
*
)
GetProcAddress
(
hComCtl32
,
"ImageList_SetImageCount"
);
pImageList_SetColorTable
=
(
void
*
)
GetProcAddress
(
hComCtl32
,
(
const
char
*
)
390
);
pImageList_GetFlags
=
(
void
*
)
GetProcAddress
(
hComCtl32
,
"ImageList_GetFlags"
);
hinst
=
GetModuleHandleA
(
NULL
);
...
...
@@ -2388,6 +2411,7 @@ START_TEST(imagelist)
test_color_table
(
ILC_COLOR4
);
test_color_table
(
ILC_COLOR8
);
test_copy
();
test_loadimage
();
FreeLibrary
(
hComCtl32
);
...
...
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