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
89f537dd
Commit
89f537dd
authored
Sep 20, 2006
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Sep 21, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: imagelist: SetImageCount can be used to decrease image count (with testcase).
parent
80664def
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
imagelist.c
dlls/comctl32/imagelist.c
+3
-2
imagelist.c
dlls/comctl32/tests/imagelist.c
+8
-0
No files found.
dlls/comctl32/imagelist.c
View file @
89f537dd
...
...
@@ -2546,11 +2546,12 @@ ImageList_SetImageCount (HIMAGELIST himl, UINT iImageCount)
if
(
!
is_valid
(
himl
))
return
FALSE
;
if
(
himl
->
cCurImage
>=
iImageCount
)
return
FALSE
;
if
(
iImageCount
<
0
)
return
FALSE
;
if
(
himl
->
cMaxImage
>
iImageCount
)
{
himl
->
cCurImage
=
iImageCount
;
/* TODO: shrink the bitmap when cMaxImage-cCurImage>cGrow ? */
return
TRUE
;
}
...
...
dlls/comctl32/tests/imagelist.c
View file @
89f537dd
...
...
@@ -327,6 +327,14 @@ static BOOL DoTest1(void)
/* remove one extra */
ok
(
!
ImageList_Remove
(
himl
,
0
),
"removed nonexistent icon
\n
"
);
/* check SetImageCount/GetImageCount */
ok
(
ImageList_SetImageCount
(
himl
,
3
),
"couldn't increase image count
\n
"
);
ok
(
ImageList_GetImageCount
(
himl
)
==
3
,
"invalid image count after increase
\n
"
);
ok
(
ImageList_SetImageCount
(
himl
,
1
),
"couldn't decrease image count
\n
"
);
ok
(
ImageList_GetImageCount
(
himl
)
==
1
,
"invalid image count after decrease to 1
\n
"
);
ok
(
ImageList_SetImageCount
(
himl
,
0
),
"couldn't decrease image count
\n
"
);
ok
(
ImageList_GetImageCount
(
himl
)
==
0
,
"invalid image count after decrease to 0
\n
"
);
/* destroy it */
ok
(
ImageList_Destroy
(
himl
),
"destroy imagelist failed
\n
"
);
...
...
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