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
dd96366b
Commit
dd96366b
authored
Jan 04, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Add a basic test for ImageList_WriteEx().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c2b366f4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
imagelist.c
dlls/comctl32/tests/imagelist.c
+25
-0
commctrl.h
include/commctrl.h
+4
-0
No files found.
dlls/comctl32/tests/imagelist.c
View file @
dd96366b
...
...
@@ -88,6 +88,7 @@ static HIMAGELIST (WINAPI *pImageList_Read)(IStream *);
static
BOOL
(
WINAPI
*
pImageList_Copy
)(
HIMAGELIST
,
int
,
HIMAGELIST
,
int
,
UINT
);
static
HIMAGELIST
(
WINAPI
*
pImageList_LoadImageW
)(
HINSTANCE
,
LPCWSTR
,
int
,
int
,
COLORREF
,
UINT
,
UINT
);
static
BOOL
(
WINAPI
*
pImageList_Draw
)(
HIMAGELIST
,
INT
,
HDC
,
INT
,
INT
,
UINT
);
static
HRESULT
(
WINAPI
*
pImageList_WriteEx
)(
HIMAGELIST
himl
,
DWORD
flags
,
IStream
*
stream
);
static
HINSTANCE
hinst
;
...
...
@@ -2574,6 +2575,28 @@ static void test_IImageList_GetIconSize(void)
IImageList_Release
(
imgl
);
}
static
void
test_ImageList_WriteEx
(
void
)
{
HIMAGELIST
himl
;
IStream
*
stream
;
HRESULT
hr
;
himl
=
pImageList_Create
(
24
,
24
,
ILC_COLOR24
,
1
,
1
);
ok
(
himl
!=
0
,
"Failed to create an imagelist.
\n
"
);
hr
=
CreateStreamOnHGlobal
(
NULL
,
TRUE
,
&
stream
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
pImageList_WriteEx
(
himl
,
ILP_NORMAL
,
stream
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
pImageList_WriteEx
(
himl
,
ILP_DOWNLEVEL
,
stream
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IStream_Release
(
stream
);
pImageList_Destroy
(
himl
);
}
static
void
init_functions
(
void
)
{
HMODULE
hComCtl32
=
LoadLibraryA
(
"comctl32.dll"
);
...
...
@@ -2601,6 +2624,7 @@ static void init_functions(void)
X
(
ImageList_Merge
);
X
(
ImageList_GetImageInfo
);
X
(
ImageList_Write
);
X
(
ImageList_WriteEx
);
X
(
ImageList_Read
);
X
(
ImageList_Copy
);
X
(
ImageList_LoadImageW
);
...
...
@@ -2669,6 +2693,7 @@ START_TEST(imagelist)
test_IImageList_SetBkColor
();
test_IImageList_GetImageCount
();
test_IImageList_GetIconSize
();
test_ImageList_WriteEx
();
CoUninitialize
();
...
...
include/commctrl.h
View file @
dd96366b
...
...
@@ -602,6 +602,10 @@ BOOL WINAPI ImageList_SetOverlayImage(HIMAGELIST,INT,INT);
#ifdef __IStream_INTERFACE_DEFINED__
HIMAGELIST
WINAPI
ImageList_Read
(
LPSTREAM
);
BOOL
WINAPI
ImageList_Write
(
HIMAGELIST
,
IStream
*
);
#define ILP_NORMAL 0
#define ILP_DOWNLEVEL 1
HRESULT
WINAPI
ImageList_WriteEx
(
HIMAGELIST
,
DWORD
,
IStream
*
);
#endif
...
...
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