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
3c5c9b15
Commit
3c5c9b15
authored
Feb 28, 2018
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Fix itemData passed in ListBox WM_MEASUREITEM message.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0a727081
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
listbox.c
dlls/user32/listbox.c
+3
-5
No files found.
dlls/user32/listbox.c
View file @
3c5c9b15
...
...
@@ -1538,7 +1538,7 @@ static LRESULT LISTBOX_InsertItem( LB_DESCR *descr, INT index,
RtlMoveMemory
(
item
+
1
,
item
,
(
descr
->
nb_items
-
index
)
*
sizeof
(
LB_ITEMDATA
)
);
item
->
str
=
str
;
item
->
data
=
data
;
item
->
data
=
HAS_STRINGS
(
descr
)
?
0
:
data
;
item
->
height
=
0
;
item
->
selected
=
FALSE
;
descr
->
nb_items
++
;
...
...
@@ -1553,7 +1553,7 @@ static LRESULT LISTBOX_InsertItem( LB_DESCR *descr, INT index,
mis
.
CtlType
=
ODT_LISTBOX
;
mis
.
CtlID
=
id
;
mis
.
itemID
=
index
;
mis
.
itemData
=
d
escr
->
items
[
index
].
d
ata
;
mis
.
itemData
=
data
;
mis
.
itemHeight
=
descr
->
item_height
;
SendMessageW
(
descr
->
owner
,
WM_MEASUREITEM
,
id
,
(
LPARAM
)
&
mis
);
item
->
height
=
mis
.
itemHeight
?
mis
.
itemHeight
:
1
;
...
...
@@ -1594,7 +1594,6 @@ static LRESULT LISTBOX_InsertItem( LB_DESCR *descr, INT index,
static
LRESULT
LISTBOX_InsertString
(
LB_DESCR
*
descr
,
INT
index
,
LPCWSTR
str
)
{
LPWSTR
new_str
=
NULL
;
ULONG_PTR
data
=
0
;
LRESULT
ret
;
if
(
HAS_STRINGS
(
descr
))
...
...
@@ -1608,10 +1607,9 @@ static LRESULT LISTBOX_InsertString( LB_DESCR *descr, INT index, LPCWSTR str )
}
strcpyW
(
new_str
,
str
);
}
else
data
=
(
ULONG_PTR
)
str
;
if
(
index
==
-
1
)
index
=
descr
->
nb_items
;
if
((
ret
=
LISTBOX_InsertItem
(
descr
,
index
,
new_str
,
data
))
!=
0
)
if
((
ret
=
LISTBOX_InsertItem
(
descr
,
index
,
new_str
,
(
ULONG_PTR
)
str
))
!=
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
new_str
);
return
ret
;
...
...
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