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
6736ed82
Commit
6736ed82
authored
Apr 07, 2008
by
Lei Zhang
Committed by
Alexandre Julliard
Apr 08, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Handle VK_ESCAPE correctly in EDIT_WM_KeyDown.
parent
7f10fe07
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
13 deletions
+8
-13
edit.c
dlls/user32/edit.c
+4
-0
edit.c
dlls/user32/tests/edit.c
+4
-13
No files found.
dlls/user32/edit.c
View file @
6736ed82
...
...
@@ -4610,6 +4610,10 @@ static LRESULT EDIT_WM_KeyDown(EDITSTATE *es, INT key)
SendMessageW
(
hwndParent
,
WM_COMMAND
,
IDOK
,
(
LPARAM
)
GetDlgItem
(
hwndParent
,
IDOK
)
);
}
break
;
case
VK_ESCAPE
:
if
(
!
(
es
->
style
&
ES_MULTILINE
))
SendMessageW
(
GetParent
(
es
->
hwndSelf
),
WM_COMMAND
,
IDCANCEL
,
(
LPARAM
)
GetDlgItem
(
GetParent
(
es
->
hwndSelf
),
IDCANCEL
)
);
break
;
}
return
0
;
}
...
...
dlls/user32/tests/edit.c
View file @
6736ed82
...
...
@@ -300,8 +300,6 @@ static INT_PTR CALLBACK edit_singleline_dialog_proc(HWND hdlg, UINT msg, WPARAM
break
;
case
1
:
PostMessage
(
hedit
,
WM_KEYDOWN
,
VK_RETURN
,
0x1c0001
);
/* needed so the test does not wait for user input */
PostMessage
(
hdlg
,
WM_USER
,
0xfeedbeef
,
0
);
break
;
case
2
:
PostMessage
(
hedit
,
WM_KEYDOWN
,
VK_TAB
,
0xf0001
);
...
...
@@ -330,8 +328,6 @@ static INT_PTR CALLBACK edit_singleline_dialog_proc(HWND hdlg, UINT msg, WPARAM
case
7
:
PostMessage
(
hedit
,
WM_KEYDOWN
,
VK_RETURN
,
0x1c0001
);
PostMessage
(
hedit
,
WM_CHAR
,
VK_RETURN
,
0x1c0001
);
/* needed so the test does not wait for user input */
PostMessage
(
hdlg
,
WM_USER
,
0xfeedbeef
,
0
);
break
;
case
8
:
PostMessage
(
hedit
,
WM_KEYDOWN
,
VK_TAB
,
0xf0001
);
...
...
@@ -371,11 +367,6 @@ static INT_PTR CALLBACK edit_singleline_dialog_proc(HWND hdlg, UINT msg, WPARAM
HWND
hfocus
=
GetFocus
();
int
len
=
SendMessage
(
hedit
,
WM_GETTEXTLENGTH
,
0
,
0
);
if
(
wparam
==
0xfeedbeef
)
{
EndDialog
(
hdlg
,
66
);
break
;
}
if
(
wparam
!=
0xdeadbeef
)
break
;
...
...
@@ -1872,7 +1863,7 @@ static void test_singleline_wantreturn_edit_dialog(void)
/* tests for WM_KEYDOWN */
r
=
DialogBoxParam
(
hinst
,
"EDIT_SINGLELINE_DIALOG"
,
NULL
,
(
DLGPROC
)
edit_singleline_dialog_proc
,
0
);
todo_wine
ok
(
222
==
r
,
"Expected %d, got %d
\n
"
,
222
,
r
);
ok
(
222
==
r
,
"Expected %d, got %d
\n
"
,
222
,
r
);
r
=
DialogBoxParam
(
hinst
,
"EDIT_SINGLELINE_DIALOG"
,
NULL
,
(
DLGPROC
)
edit_singleline_dialog_proc
,
1
);
ok
(
111
==
r
,
"Expected %d, got %d
\n
"
,
111
,
r
);
r
=
DialogBoxParam
(
hinst
,
"EDIT_SINGLELINE_DIALOG"
,
NULL
,
(
DLGPROC
)
edit_singleline_dialog_proc
,
2
);
...
...
@@ -1888,7 +1879,7 @@ static void test_singleline_wantreturn_edit_dialog(void)
/* tests for WM_KEYDOWN + WM_CHAR */
r
=
DialogBoxParam
(
hinst
,
"EDIT_SINGLELINE_DIALOG"
,
NULL
,
(
DLGPROC
)
edit_singleline_dialog_proc
,
6
);
todo_wine
ok
(
222
==
r
,
"Expected %d, got %d
\n
"
,
222
,
r
);
ok
(
222
==
r
,
"Expected %d, got %d
\n
"
,
222
,
r
);
r
=
DialogBoxParam
(
hinst
,
"EDIT_SINGLELINE_DIALOG"
,
NULL
,
(
DLGPROC
)
edit_singleline_dialog_proc
,
7
);
ok
(
111
==
r
,
"Expected %d, got %d
\n
"
,
111
,
r
);
r
=
DialogBoxParam
(
hinst
,
"EDIT_SINGLELINE_DIALOG"
,
NULL
,
(
DLGPROC
)
edit_singleline_dialog_proc
,
8
);
...
...
@@ -1896,7 +1887,7 @@ static void test_singleline_wantreturn_edit_dialog(void)
/* tests for WM_KEYDOWN */
r
=
DialogBoxParam
(
hinst
,
"EDIT_SINGLELINE_WANTRETURN_DIALOG"
,
NULL
,
(
DLGPROC
)
edit_singleline_dialog_proc
,
0
);
todo_wine
ok
(
222
==
r
,
"Expected %d, got %d
\n
"
,
222
,
r
);
ok
(
222
==
r
,
"Expected %d, got %d
\n
"
,
222
,
r
);
r
=
DialogBoxParam
(
hinst
,
"EDIT_SINGLELINE_WANTRETURN_DIALOG"
,
NULL
,
(
DLGPROC
)
edit_singleline_dialog_proc
,
1
);
ok
(
111
==
r
,
"Expected %d, got %d
\n
"
,
111
,
r
);
r
=
DialogBoxParam
(
hinst
,
"EDIT_SINGLELINE_WANTRETURN_DIALOG"
,
NULL
,
(
DLGPROC
)
edit_singleline_dialog_proc
,
2
);
...
...
@@ -1912,7 +1903,7 @@ static void test_singleline_wantreturn_edit_dialog(void)
/* tests for WM_KEYDOWN + WM_CHAR */
r
=
DialogBoxParam
(
hinst
,
"EDIT_SINGLELINE_WANTRETURN_DIALOG"
,
NULL
,
(
DLGPROC
)
edit_singleline_dialog_proc
,
6
);
todo_wine
ok
(
222
==
r
,
"Expected %d, got %d
\n
"
,
222
,
r
);
ok
(
222
==
r
,
"Expected %d, got %d
\n
"
,
222
,
r
);
r
=
DialogBoxParam
(
hinst
,
"EDIT_SINGLELINE_WANTRETURN_DIALOG"
,
NULL
,
(
DLGPROC
)
edit_singleline_dialog_proc
,
7
);
ok
(
111
==
r
,
"Expected %d, got %d
\n
"
,
111
,
r
);
r
=
DialogBoxParam
(
hinst
,
"EDIT_SINGLELINE_WANTRETURN_DIALOG"
,
NULL
,
(
DLGPROC
)
edit_singleline_dialog_proc
,
8
);
...
...
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