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
60e467a6
Commit
60e467a6
authored
Jun 07, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 07, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/rebar: Fix index check condition for RB_SHOWBAND.
parent
c99c5a41
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
1 deletion
+32
-1
rebar.c
dlls/comctl32/rebar.c
+1
-1
rebar.c
dlls/comctl32/tests/rebar.c
+31
-0
No files found.
dlls/comctl32/rebar.c
View file @
60e467a6
...
...
@@ -2779,7 +2779,7 @@ REBAR_ShowBand (REBAR_INFO *infoPtr, INT iBand, BOOL show)
{
REBAR_BAND
*
lpBand
;
if
(
iBand
<
0
||
iBand
>
infoPtr
->
uNumBands
)
if
(
iBand
<
0
||
iBand
>
=
infoPtr
->
uNumBands
)
return
FALSE
;
lpBand
=
REBAR_GetBand
(
infoPtr
,
iBand
);
...
...
dlls/comctl32/tests/rebar.c
View file @
60e467a6
...
...
@@ -925,6 +925,36 @@ static HWND create_parent_window(void)
return
hwnd
;
}
static
void
test_showband
(
void
)
{
HWND
hRebar
;
REBARBANDINFOA
rbi
;
BOOL
ret
;
hRebar
=
create_rebar_control
();
/* no bands */
ret
=
SendMessageA
(
hRebar
,
RB_SHOWBAND
,
0
,
TRUE
);
ok
(
ret
==
FALSE
,
"got %d
\n
"
,
ret
);
rbi
.
cbSize
=
REBARBANDINFOA_V6_SIZE
;
rbi
.
fMask
=
RBBIM_SIZE
|
RBBIM_CHILDSIZE
|
RBBIM_CHILD
;
rbi
.
cx
=
200
;
rbi
.
cxMinChild
=
100
;
rbi
.
cyMinChild
=
30
;
rbi
.
hwndChild
=
NULL
;
SendMessageA
(
hRebar
,
RB_INSERTBAND
,
-
1
,
(
LPARAM
)
&
rbi
);
/* index out of range */
ret
=
SendMessageA
(
hRebar
,
RB_SHOWBAND
,
1
,
TRUE
);
ok
(
ret
==
FALSE
,
"got %d
\n
"
,
ret
);
ret
=
SendMessageA
(
hRebar
,
RB_SHOWBAND
,
0
,
TRUE
);
ok
(
ret
==
TRUE
,
"got %d
\n
"
,
ret
);
DestroyWindow
(
hRebar
);
}
START_TEST
(
rebar
)
{
HMODULE
hComctl32
;
...
...
@@ -948,6 +978,7 @@ START_TEST(rebar)
test_bandinfo
();
test_colors
();
test_showband
();
if
(
!
is_font_installed
(
"System"
)
||
!
is_font_installed
(
"Tahoma"
))
{
...
...
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