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
2c1b3c6a
Commit
2c1b3c6a
authored
Sep 12, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The item user data has to be a ULONG_PTR.
parent
6153b1f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
listbox.c
dlls/user/listbox.c
+10
-10
No files found.
dlls/user/listbox.c
View file @
2c1b3c6a
...
...
@@ -63,10 +63,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(listbox);
/* Item structure */
typedef
struct
{
LPWSTR
str
;
/* Item text */
BOOL
selected
;
/* Is item selected? */
UINT
height
;
/* Item height (only for OWNERDRAWVARIABLE) */
DWORD
data
;
/* User data */
LPWSTR
str
;
/* Item text */
BOOL
selected
;
/* Is item selected? */
UINT
height
;
/* Item height (only for OWNERDRAWVARIABLE) */
ULONG_PTR
data
;
/* User data */
}
LB_ITEMDATA
;
/* Listbox structure */
...
...
@@ -841,7 +841,7 @@ static INT LISTBOX_FindStringPos( LB_DESCR *descr, LPCWSTR str, BOOL exact )
/* note that some application (MetaStock) expects the second item
* to be in the listbox */
cis
.
itemID1
=
-
1
;
cis
.
itemData1
=
(
DWORD
)
str
;
cis
.
itemData1
=
(
ULONG_PTR
)
str
;
cis
.
itemID2
=
index
;
cis
.
itemData2
=
descr
->
items
[
index
].
data
;
cis
.
dwLocaleId
=
descr
->
locale
;
...
...
@@ -955,9 +955,9 @@ static INT LISTBOX_FindString( LB_DESCR *descr, INT start, LPCWSTR str, BOOL exa
/* Otherwise use a linear search */
for
(
i
=
start
+
1
;
i
<
descr
->
nb_items
;
i
++
,
item
++
)
if
(
item
->
data
==
(
DWORD
)
str
)
return
i
;
if
(
item
->
data
==
(
ULONG_PTR
)
str
)
return
i
;
for
(
i
=
0
,
item
=
descr
->
items
;
i
<=
start
;
i
++
,
item
++
)
if
(
item
->
data
==
(
DWORD
)
str
)
return
i
;
if
(
item
->
data
==
(
ULONG_PTR
)
str
)
return
i
;
}
return
LB_ERR
;
}
...
...
@@ -1503,7 +1503,7 @@ static void LISTBOX_MoveCaret( LB_DESCR *descr, INT index, BOOL fully_visible )
* LISTBOX_InsertItem
*/
static
LRESULT
LISTBOX_InsertItem
(
LB_DESCR
*
descr
,
INT
index
,
LPWSTR
str
,
DWORD
data
)
LPWSTR
str
,
ULONG_PTR
data
)
{
LB_ITEMDATA
*
item
;
INT
max_items
;
...
...
@@ -1594,7 +1594,7 @@ static LRESULT LISTBOX_InsertItem( LB_DESCR *descr, INT index,
static
LRESULT
LISTBOX_InsertString
(
LB_DESCR
*
descr
,
INT
index
,
LPCWSTR
str
)
{
LPWSTR
new_str
=
NULL
;
DWORD
data
=
0
;
ULONG_PTR
data
=
0
;
LRESULT
ret
;
if
(
HAS_STRINGS
(
descr
))
...
...
@@ -1608,7 +1608,7 @@ static LRESULT LISTBOX_InsertString( LB_DESCR *descr, INT index, LPCWSTR str )
}
strcpyW
(
new_str
,
str
);
}
else
data
=
(
DWORD
)
str
;
else
data
=
(
ULONG_PTR
)
str
;
if
(
index
==
-
1
)
index
=
descr
->
nb_items
;
if
((
ret
=
LISTBOX_InsertItem
(
descr
,
index
,
new_str
,
data
))
!=
0
)
...
...
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