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
abf3a570
Commit
abf3a570
authored
Mar 09, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Mar 09, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user: The height of a ListBox item can be no more than MAXBYTE.
parent
fe8cd388
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
0 deletions
+43
-0
listbox.c
dlls/user/listbox.c
+3
-0
listbox.c
dlls/user/tests/listbox.c
+40
-0
No files found.
dlls/user/listbox.c
View file @
abf3a570
...
...
@@ -1187,6 +1187,9 @@ static LRESULT LISTBOX_GetItemHeight( LB_DESCR *descr, INT index )
*/
static
LRESULT
LISTBOX_SetItemHeight
(
LB_DESCR
*
descr
,
INT
index
,
INT
height
,
BOOL
repaint
)
{
if
(
height
>
MAXBYTE
)
return
-
1
;
if
(
!
height
)
height
=
1
;
if
(
descr
->
style
&
LBS_OWNERDRAWVARIABLE
)
...
...
dlls/user/tests/listbox.c
View file @
abf3a570
...
...
@@ -390,6 +390,45 @@ static void test_selection(void)
DestroyWindow
(
hLB
);
}
static
void
test_listbox_height
(
void
)
{
HWND
hList
;
int
r
,
id
;
hList
=
CreateWindow
(
"ListBox"
,
"list test"
,
0
,
1
,
1
,
600
,
100
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
hList
!=
NULL
,
"failed to create listbox
\n
"
);
id
=
SendMessage
(
hList
,
LB_ADDSTRING
,
0
,
(
LPARAM
)
"hi"
);
ok
(
id
==
0
,
"item id wrong
\n
"
);
r
=
SendMessage
(
hList
,
LB_SETITEMHEIGHT
,
0
,
MAKELPARAM
(
20
,
0
));
ok
(
r
==
0
,
"send message failed
\n
"
);
r
=
SendMessage
(
hList
,
LB_GETITEMHEIGHT
,
0
,
0
);
ok
(
r
==
20
,
"height wrong
\n
"
);
r
=
SendMessage
(
hList
,
LB_SETITEMHEIGHT
,
0
,
MAKELPARAM
(
0
,
30
));
ok
(
r
==
-
1
,
"send message failed
\n
"
);
r
=
SendMessage
(
hList
,
LB_GETITEMHEIGHT
,
0
,
0
);
ok
(
r
==
20
,
"height wrong
\n
"
);
r
=
SendMessage
(
hList
,
LB_SETITEMHEIGHT
,
0
,
MAKELPARAM
(
0x100
,
0
));
ok
(
r
==
-
1
,
"send message failed
\n
"
);
r
=
SendMessage
(
hList
,
LB_GETITEMHEIGHT
,
0
,
0
);
ok
(
r
==
20
,
"height wrong
\n
"
);
r
=
SendMessage
(
hList
,
LB_SETITEMHEIGHT
,
0
,
MAKELPARAM
(
0xff
,
0
));
ok
(
r
==
0
,
"send message failed
\n
"
);
r
=
SendMessage
(
hList
,
LB_GETITEMHEIGHT
,
0
,
0
);
ok
(
r
==
0xff
,
"height wrong
\n
"
);
DestroyWindow
(
hList
);
}
START_TEST
(
listbox
)
{
const
struct
listbox_test
SS
=
...
...
@@ -463,4 +502,5 @@ START_TEST(listbox)
check_item_height
();
test_ownerdraw
();
test_selection
();
test_listbox_height
();
}
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