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
104e1cf6
Commit
104e1cf6
authored
Dec 05, 2006
by
Huw Davies
Committed by
Alexandre Julliard
Dec 05, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: For LBS_OWNERDRAWVARIABLE listboxes return the fixed item height if the listbox is empty.
parent
0b652fe8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
listbox.c
dlls/user32/listbox.c
+1
-1
listbox.c
dlls/user32/tests/listbox.c
+10
-0
No files found.
dlls/user32/listbox.c
View file @
104e1cf6
...
...
@@ -1169,7 +1169,7 @@ static void LISTBOX_InvalidateItemRect( LB_DESCR *descr, INT index )
*/
static
LRESULT
LISTBOX_GetItemHeight
(
LB_DESCR
*
descr
,
INT
index
)
{
if
(
descr
->
style
&
LBS_OWNERDRAWVARIABLE
)
if
(
descr
->
style
&
LBS_OWNERDRAWVARIABLE
&&
descr
->
nb_items
>
0
)
{
if
((
index
<
0
)
||
(
index
>=
descr
->
nb_items
))
{
...
...
dlls/user32/tests/listbox.c
View file @
104e1cf6
...
...
@@ -214,6 +214,16 @@ static void check_item_height(void)
ok
(
itemHeight
==
tm
.
tmHeight
,
"Item height wrong, got %d, expecting %d
\n
"
,
itemHeight
,
tm
.
tmHeight
);
DestroyWindow
(
hLB
);
hLB
=
CreateWindow
(
"LISTBOX"
,
"TestList"
,
LBS_OWNERDRAWVARIABLE
,
0
,
0
,
100
,
100
,
NULL
,
NULL
,
NULL
,
0
);
itemHeight
=
SendMessage
(
hLB
,
LB_GETITEMHEIGHT
,
0
,
0
);
ok
(
itemHeight
==
tm
.
tmHeight
,
"itemHeight %d
\n
"
,
itemHeight
);
itemHeight
=
SendMessage
(
hLB
,
LB_GETITEMHEIGHT
,
5
,
0
);
ok
(
itemHeight
==
tm
.
tmHeight
,
"itemHeight %d
\n
"
,
itemHeight
);
itemHeight
=
SendMessage
(
hLB
,
LB_GETITEMHEIGHT
,
-
5
,
0
);
ok
(
itemHeight
==
tm
.
tmHeight
,
"itemHeight %d
\n
"
,
itemHeight
);
DestroyWindow
(
hLB
);
}
static
LRESULT
WINAPI
main_window_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
...
...
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