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
a50ca4ac
Commit
a50ca4ac
authored
Oct 04, 2009
by
Sergey Khodych
Committed by
Alexandre Julliard
Oct 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Implement handling of WM_KEYDOWN VK_ESCAPE in the dialog mode.
parent
8fb119ba
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
editor.c
dlls/riched20/editor.c
+4
-0
editor.c
dlls/riched20/tests/editor.c
+30
-0
No files found.
dlls/riched20/editor.c
View file @
a50ca4ac
...
...
@@ -2289,6 +2289,10 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
return
TRUE
;
}
break
;
case
VK_ESCAPE
:
if
(
editor
->
bDialogMode
&&
editor
->
hwndParent
)
PostMessageW
(
editor
->
hwndParent
,
WM_CLOSE
,
0
,
0
);
return
TRUE
;
case
'A'
:
if
(
ctrl_is_down
)
{
...
...
dlls/riched20/tests/editor.c
View file @
a50ca4ac
...
...
@@ -6831,6 +6831,11 @@ static void test_dialogmode(void)
ok
(
2
==
lcount
,
"expected 2, got %d
\n
"
,
lcount
);
memset
(
&
dm_messages
,
0
,
sizeof
(
dm_messages
));
r
=
SendMessage
(
hwRichEdit
,
WM_KEYDOWN
,
VK_ESCAPE
,
0x10001
);
ok
(
0
==
r
,
"expected 0, got %d
\n
"
,
r
);
test_dm_messages
(
0
,
0
,
0
);
memset
(
&
dm_messages
,
0
,
sizeof
(
dm_messages
));
r
=
SendMessage
(
hwRichEdit
,
WM_GETDLGCODE
,
0
,
(
LPARAM
)
&
msg
);
ok
(
0x8f
==
r
,
"expected 0x8f, got 0x%x
\n
"
,
r
);
test_dm_messages
(
0
,
0
,
0
);
...
...
@@ -6843,6 +6848,11 @@ static void test_dialogmode(void)
lcount
=
SendMessage
(
hwRichEdit
,
EM_GETLINECOUNT
,
0
,
0
);
ok
(
2
==
lcount
,
"expected 2, got %d
\n
"
,
lcount
);
memset
(
&
dm_messages
,
0
,
sizeof
(
dm_messages
));
r
=
SendMessage
(
hwRichEdit
,
WM_KEYDOWN
,
VK_ESCAPE
,
0x10001
);
ok
(
0
==
r
,
"expected 0, got %d
\n
"
,
r
);
test_dm_messages
(
0
,
0
,
0
);
hwButton
=
CreateWindow
(
"BUTTON"
,
"OK"
,
WS_VISIBLE
|
WS_CHILD
|
BS_PUSHBUTTON
,
100
,
100
,
50
,
20
,
hwParent
,
(
HMENU
)
ID_RICHEDITTESTDBUTTON
,
GetModuleHandleA
(
0
),
NULL
);
ok
(
hwButton
!=
NULL
,
"CreateWindow failed with error code %d
\n
"
,
GetLastError
());
...
...
@@ -6871,6 +6881,11 @@ static void test_dialogmode(void)
ok
(
2
==
lcount
,
"expected 2, got %d
\n
"
,
lcount
);
memset
(
&
dm_messages
,
0
,
sizeof
(
dm_messages
));
r
=
SendMessage
(
hwRichEdit
,
WM_KEYDOWN
,
VK_ESCAPE
,
0x10001
);
ok
(
0
==
r
,
"expected 0, got %d
\n
"
,
r
);
test_dm_messages
(
0
,
0
,
0
);
memset
(
&
dm_messages
,
0
,
sizeof
(
dm_messages
));
r
=
SendMessage
(
hwRichEdit
,
WM_GETDLGCODE
,
0
,
(
LPARAM
)
&
msg
);
ok
(
0x8f
==
r
,
"expected 0x8f, got 0x%x
\n
"
,
r
);
test_dm_messages
(
0
,
0
,
0
);
...
...
@@ -6883,6 +6898,11 @@ static void test_dialogmode(void)
lcount
=
SendMessage
(
hwRichEdit
,
EM_GETLINECOUNT
,
0
,
0
);
ok
(
3
==
lcount
,
"expected 3, got %d
\n
"
,
lcount
);
memset
(
&
dm_messages
,
0
,
sizeof
(
dm_messages
));
r
=
SendMessage
(
hwRichEdit
,
WM_KEYDOWN
,
VK_ESCAPE
,
0x10001
);
ok
(
0
==
r
,
"expected 0, got %d
\n
"
,
r
);
test_dm_messages
(
0
,
0
,
0
);
hwButton
=
CreateWindow
(
"BUTTON"
,
"OK"
,
WS_VISIBLE
|
WS_CHILD
|
BS_PUSHBUTTON
,
100
,
100
,
50
,
20
,
hwParent
,
(
HMENU
)
ID_RICHEDITTESTDBUTTON
,
GetModuleHandleA
(
0
),
NULL
);
ok
(
hwButton
!=
NULL
,
"CreateWindow failed with error code %d
\n
"
,
GetLastError
());
...
...
@@ -6908,6 +6928,11 @@ static void test_dialogmode(void)
test_dm_messages
(
0
,
0
,
0
);
memset
(
&
dm_messages
,
0
,
sizeof
(
dm_messages
));
r
=
SendMessage
(
hwRichEdit
,
WM_KEYDOWN
,
VK_ESCAPE
,
0x10001
);
ok
(
0
==
r
,
"expected 0, got %d
\n
"
,
r
);
test_dm_messages
(
0
,
0
,
0
);
memset
(
&
dm_messages
,
0
,
sizeof
(
dm_messages
));
r
=
SendMessage
(
hwRichEdit
,
WM_GETDLGCODE
,
0
,
(
LPARAM
)
&
msg
);
ok
(
0x8b
==
r
,
"expected 0x8b, got 0x%x
\n
"
,
r
);
test_dm_messages
(
0
,
0
,
0
);
...
...
@@ -6917,6 +6942,11 @@ static void test_dialogmode(void)
ok
(
0
==
r
,
"expected 0, got %d
\n
"
,
r
);
test_dm_messages
(
0
,
1
,
0
);
memset
(
&
dm_messages
,
0
,
sizeof
(
dm_messages
));
r
=
SendMessage
(
hwRichEdit
,
WM_KEYDOWN
,
VK_ESCAPE
,
0x10001
);
ok
(
0
==
r
,
"expected 0, got %d
\n
"
,
r
);
test_dm_messages
(
0
,
0
,
0
);
hwButton
=
CreateWindow
(
"BUTTON"
,
"OK"
,
WS_VISIBLE
|
WS_CHILD
|
BS_PUSHBUTTON
,
100
,
100
,
50
,
20
,
hwParent
,
(
HMENU
)
ID_RICHEDITTESTDBUTTON
,
GetModuleHandleA
(
0
),
NULL
);
ok
(
hwButton
!=
NULL
,
"CreateWindow failed with error code %d
\n
"
,
GetLastError
());
...
...
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