Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
acbd6320
Commit
acbd6320
authored
Aug 21, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/imagelist: Fix return value for IImageList_GetIconSize().
parent
9b77425f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
4 deletions
+49
-4
imagelist.c
dlls/comctl32/imagelist.c
+1
-4
imagelist.c
dlls/comctl32/tests/imagelist.c
+48
-0
No files found.
dlls/comctl32/imagelist.c
View file @
acbd6320
...
...
@@ -3431,7 +3431,7 @@ static HRESULT WINAPI ImageListImpl_GetIconSize(IImageList *iface, int *cx,
{
HIMAGELIST
This
=
(
HIMAGELIST
)
iface
;
return
ImageList_GetIconSize
(
This
,
cx
,
cy
)
?
S_OK
:
E_
FAIL
;
return
ImageList_GetIconSize
(
This
,
cx
,
cy
)
?
S_OK
:
E_
INVALIDARG
;
}
static
HRESULT
WINAPI
ImageListImpl_SetIconSize
(
IImageList
*
iface
,
int
cx
,
...
...
@@ -3442,9 +3442,6 @@ static HRESULT WINAPI ImageListImpl_SetIconSize(IImageList *iface, int cx,
static
HRESULT
WINAPI
ImageListImpl_GetImageCount
(
IImageList
*
iface
,
int
*
pi
)
{
if
(
!
pi
)
return
E_FAIL
;
*
pi
=
ImageList_GetImageCount
((
HIMAGELIST
)
iface
);
return
S_OK
;
}
...
...
dlls/comctl32/tests/imagelist.c
View file @
acbd6320
...
...
@@ -1863,6 +1863,52 @@ if (0)
IImageList_Release
(
imgl
);
}
static
void
test_IImageList_GetImageCount
(
void
)
{
IImageList
*
imgl
;
HIMAGELIST
himl
;
int
count
;
HRESULT
hr
;
himl
=
ImageList_Create
(
16
,
16
,
ILC_COLOR16
,
0
,
3
);
imgl
=
(
IImageList
*
)
himl
;
if
(
0
)
{
/* crashes on native */
hr
=
IImageList_GetImageCount
(
imgl
,
NULL
);
}
count
=
-
1
;
hr
=
IImageList_GetImageCount
(
imgl
,
&
count
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
count
==
0
,
"got %d
\n
"
,
count
);
IImageList_Release
(
imgl
);
}
static
void
test_IImageList_GetIconSize
(
void
)
{
IImageList
*
imgl
;
HIMAGELIST
himl
;
int
cx
,
cy
;
HRESULT
hr
;
himl
=
ImageList_Create
(
16
,
16
,
ILC_COLOR16
,
0
,
3
);
imgl
=
(
IImageList
*
)
himl
;
hr
=
IImageList_GetIconSize
(
imgl
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IImageList_GetIconSize
(
imgl
,
&
cx
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IImageList_GetIconSize
(
imgl
,
NULL
,
&
cy
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
IImageList_Release
(
imgl
);
}
START_TEST
(
imagelist
)
{
ULONG_PTR
ctx_cookie
;
...
...
@@ -1918,6 +1964,8 @@ START_TEST(imagelist)
test_IImageList_Clone
();
test_IImageList_GetBkColor
();
test_IImageList_SetBkColor
();
test_IImageList_GetImageCount
();
test_IImageList_GetIconSize
();
CoUninitialize
();
...
...
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