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
13b376df
Commit
13b376df
authored
Aug 14, 2007
by
Peter Verthez
Committed by
Alexandre Julliard
Aug 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: LB_SETITEMDATA should return 1 on success, not 0.
parent
3d58a065
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
listbox.c
dlls/user32/listbox.c
+2
-1
listbox.c
dlls/user32/tests/listbox.c
+22
-0
No files found.
dlls/user32/listbox.c
View file @
13b376df
...
...
@@ -2677,7 +2677,8 @@ static LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg,
return
LB_ERR
;
}
descr
->
items
[
wParam
].
data
=
lParam
;
return
LB_OKAY
;
/* undocumented: returns TRUE, not LB_OKAY (0) */
return
TRUE
;
case
LB_GETCOUNT16
:
case
LB_GETCOUNT
:
...
...
dlls/user32/tests/listbox.c
View file @
13b376df
...
...
@@ -512,6 +512,27 @@ static void test_itemfrompoint(void)
DestroyWindow
(
hList
);
}
static
void
test_listbox_item_data
(
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_SETITEMDATA
,
0
,
MAKELPARAM
(
20
,
0
));
ok
(
r
==
TRUE
,
"LB_SETITEMDATA returned %d instead of TRUE
\n
"
,
r
);
r
=
SendMessage
(
hList
,
LB_GETITEMDATA
,
0
,
0
);
ok
(
r
==
20
,
"get item data failed
\n
"
);
DestroyWindow
(
hList
);
}
START_TEST
(
listbox
)
{
const
struct
listbox_test
SS
=
...
...
@@ -587,4 +608,5 @@ START_TEST(listbox)
test_selection
();
test_listbox_height
();
test_itemfrompoint
();
test_listbox_item_data
();
}
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