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
ae7a646f
Commit
ae7a646f
authored
Aug 08, 2005
by
Francois Gouget
Committed by
Alexandre Julliard
Aug 08, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The listbox test shows that the control id must be stored in WPARAM
for the WM_DRAWITEM message. Fix the listbox test so CreateWindow() does not fail on Windows.
parent
cdd75bd4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
listbox.c
dlls/user/listbox.c
+1
-1
listbox.c
dlls/user/tests/listbox.c
+8
-3
No files found.
dlls/user/listbox.c
View file @
ae7a646f
...
...
@@ -578,7 +578,7 @@ static void LISTBOX_PaintItem( LB_DESCR *descr, HDC hdc, const RECT *rect,
TRACE
(
"[%p]: drawitem %d (%s) action=%02x state=%02x rect=%ld,%ld-%ld,%ld
\n
"
,
descr
->
self
,
index
,
item
?
debugstr_w
(
item
->
str
)
:
""
,
action
,
dis
.
itemState
,
rect
->
left
,
rect
->
top
,
rect
->
right
,
rect
->
bottom
);
SendMessageW
(
descr
->
owner
,
WM_DRAWITEM
,
0
,
(
LPARAM
)
&
dis
);
SendMessageW
(
descr
->
owner
,
WM_DRAWITEM
,
dis
.
CtlID
,
(
LPARAM
)
&
dis
);
}
else
{
...
...
dlls/user/tests/listbox.c
View file @
ae7a646f
...
...
@@ -47,10 +47,14 @@ static const char * const strings[4] = {
static
HWND
create_listbox
(
DWORD
add_style
,
HWND
parent
)
{
HWND
handle
=
CreateWindow
(
"LISTBOX"
,
"TestList"
,
HWND
handle
;
int
ctl_id
=
0
;
if
(
parent
)
ctl_id
=
1
;
handle
=
CreateWindow
(
"LISTBOX"
,
"TestList"
,
(
LBS_STANDARD
&
~
LBS_SORT
)
|
add_style
,
0
,
0
,
100
,
100
,
parent
,
(
HMENU
)
1
,
NULL
,
0
);
parent
,
(
HMENU
)
ctl_id
,
NULL
,
0
);
assert
(
handle
);
SendMessage
(
handle
,
LB_ADDSTRING
,
0
,
(
LPARAM
)
(
LPCTSTR
)
strings
[
0
]);
...
...
@@ -212,7 +216,8 @@ static LRESULT WINAPI main_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARA
trace
(
"%p WM_DRAWITEM %08x %08lx
\n
"
,
hwnd
,
wparam
,
lparam
);
ok
(
wparam
==
0
,
"wrong wparam %04x
\n
"
,
wparam
);
ok
(
wparam
==
dis
->
CtlID
,
"got wParam=%08x instead of %08x
\n
"
,
wparam
,
dis
->
CtlID
);
ok
(
dis
->
CtlType
==
ODT_LISTBOX
,
"wrong CtlType %04x
\n
"
,
dis
->
CtlType
);
GetClientRect
(
dis
->
hwndItem
,
&
rc_client
);
...
...
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