Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Mayr
wine
Commits
1e5faee2
Commit
1e5faee2
authored
17 years ago
by
Lei Zhang
Committed by
Alexandre Julliard
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
user32: Add a test for sending WM_KEYDOWN to a child edit control.
parent
97e1fef0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/user32/tests/edit.c
+32
-0
32 additions, 0 deletions
dlls/user32/tests/edit.c
with
32 additions
and
0 deletions
dlls/user32/tests/edit.c
+
32
−
0
View file @
1e5faee2
...
...
@@ -1906,6 +1906,37 @@ static void test_singleline_wantreturn_edit_dialog(void)
ok
(
444
==
r
,
"Expected %d, got %d
\n
"
,
444
,
r
);
}
static
int
child_edit_wmkeydown_num_messages
=
0
;
static
INT_PTR
CALLBACK
child_edit_wmkeydown_proc
(
HWND
hdlg
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
switch
(
msg
)
{
case
WM_DESTROY
:
case
WM_NCDESTROY
:
break
;
default:
child_edit_wmkeydown_num_messages
++
;
break
;
}
return
FALSE
;
}
static
void
test_child_edit_wmkeydown
(
void
)
{
HWND
hwEdit
,
hwParent
;
int
r
;
hwEdit
=
create_child_editcontrol
(
0
,
0
);
hwParent
=
GetParent
(
hwEdit
);
SetWindowLong
(
hwParent
,
GWL_WNDPROC
,
(
LONG
)
child_edit_wmkeydown_proc
);
r
=
SendMessage
(
hwEdit
,
WM_KEYDOWN
,
VK_RETURN
,
0x1c0001
);
todo_wine
ok
(
1
==
r
,
"expected 1, got %d
\n
"
,
r
);
todo_wine
ok
(
0
==
child_edit_wmkeydown_num_messages
,
"expected 0, got %d
\n
"
,
child_edit_wmkeydown_num_messages
);
destroy_child_editcontrol
(
hwEdit
);
}
static
BOOL
RegisterWindowClasses
(
void
)
{
WNDCLASSA
test2
;
...
...
@@ -1980,6 +2011,7 @@ START_TEST(edit)
test_multi_edit_dialog
();
test_wantreturn_edit_dialog
();
test_singleline_wantreturn_edit_dialog
();
test_child_edit_wmkeydown
();
UnregisterWindowClasses
();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment