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
376e4542
Commit
376e4542
authored
Apr 02, 2008
by
Lei Zhang
Committed by
Alexandre Julliard
Apr 03, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Correctly handle VK_RETURN for edit controls with ES_WANTRETURN style.
parent
08a4d2af
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
9 deletions
+20
-9
edit.c
dlls/user32/edit.c
+2
-3
edit.c
dlls/user32/tests/edit.c
+17
-5
resource.rc
dlls/user32/tests/resource.rc
+1
-1
No files found.
dlls/user32/edit.c
View file @
376e4542
...
...
@@ -811,9 +811,6 @@ static LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg,
{
switch
(
vk
)
{
case
VK_RETURN
:
SendMessageW
(
GetParent
(
hwnd
),
WM_COMMAND
,
IDOK
,
(
LPARAM
)
GetDlgItem
(
GetParent
(
hwnd
),
IDOK
));
break
;
case
VK_ESCAPE
:
SendMessageW
(
GetParent
(
hwnd
),
WM_CLOSE
,
0
,
0
);
break
;
...
...
@@ -4608,6 +4605,8 @@ static LRESULT EDIT_WM_KeyDown(EDITSTATE *es, INT key)
MAKEWPARAM
(
LOWORD
(
dw
),
BN_CLICKED
),
(
LPARAM
)
GetDlgItem
(
hwndParent
,
LOWORD
(
dw
)
)
);
}
else
SendMessageW
(
hwndParent
,
WM_COMMAND
,
IDOK
,
(
LPARAM
)
GetDlgItem
(
hwndParent
,
IDOK
)
);
}
break
;
}
...
...
dlls/user32/tests/edit.c
View file @
376e4542
...
...
@@ -39,6 +39,7 @@ static struct edit_notify notifications;
static
INT_PTR
CALLBACK
multi_edit_dialog_proc
(
HWND
hdlg
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
static
int
num_ok_commands
=
0
;
switch
(
msg
)
{
case
WM_INITDIALOG
:
...
...
@@ -62,6 +63,13 @@ static INT_PTR CALLBACK multi_edit_dialog_proc(HWND hdlg, UINT msg, WPARAM wpara
PostMessage
(
hdlg
,
WM_USER
,
0xdeadbeef
,
0
);
break
;
/* test cases for pressing enter */
case
3
:
num_ok_commands
=
0
;
PostMessage
(
hedit
,
WM_KEYDOWN
,
VK_RETURN
,
0x1c0001
);
PostMessage
(
hdlg
,
WM_USER
,
0xdeadbeef
,
1
);
break
;
default:
break
;
}
...
...
@@ -75,11 +83,7 @@ static INT_PTR CALLBACK multi_edit_dialog_proc(HWND hdlg, UINT msg, WPARAM wpara
switch
(
LOWORD
(
wparam
))
{
case
IDOK
:
EndDialog
(
hdlg
,
111
);
break
;
case
IDCANCEL
:
EndDialog
(
hdlg
,
222
);
num_ok_commands
++
;
break
;
default:
...
...
@@ -109,6 +113,12 @@ static INT_PTR CALLBACK multi_edit_dialog_proc(HWND hdlg, UINT msg, WPARAM wpara
else
EndDialog
(
hdlg
,
4444
);
break
;
case
1
:
if
((
hfocus
==
hedit
)
&&
(
num_ok_commands
==
0
))
EndDialog
(
hdlg
,
11
);
else
EndDialog
(
hdlg
,
22
);
break
;
default:
EndDialog
(
hdlg
,
5555
);
}
...
...
@@ -1441,6 +1451,8 @@ static void test_multi_edit_dialog(void)
ok
(
1111
==
r
,
"Expected %d, got %d
\n
"
,
1111
,
r
);
r
=
DialogBoxParam
(
hinst
,
"MULTI_EDIT_DIALOG"
,
NULL
,
(
DLGPROC
)
multi_edit_dialog_proc
,
2
);
ok
(
2222
==
r
,
"Expected %d, got %d
\n
"
,
2222
,
r
);
r
=
DialogBoxParam
(
hinst
,
"MULTI_EDIT_DIALOG"
,
NULL
,
(
DLGPROC
)
multi_edit_dialog_proc
,
3
);
ok
(
11
==
r
,
"Expected %d, got %d
\n
"
,
11
,
r
);
}
static
BOOL
RegisterWindowClasses
(
void
)
...
...
dlls/user32/tests/resource.rc
View file @
376e4542
...
...
@@ -103,7 +103,7 @@ STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
CAPTION "Multiple Edit Test"
FONT 8, "MS Shell Dlg"
{
EDITTEXT 1000, 5, 5, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
EDITTEXT 1000, 5, 5, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
| ES_MULTILINE | ES_WANTRETURN
EDITTEXT 1001, 5, 25, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
EDITTEXT 1002, 5, 45, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
}
...
...
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