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
2b53df89
Commit
2b53df89
authored
May 06, 2011
by
Marcus Meissner
Committed by
Alexandre Julliard
May 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Fixed some lParams with keycodes (Coverity).
parent
2573c844
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
editor.c
dlls/riched20/tests/editor.c
+10
-10
No files found.
dlls/riched20/tests/editor.c
View file @
2b53df89
...
...
@@ -4739,7 +4739,7 @@ static void test_WM_PASTE(void)
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
0
);
/* Send WM_CHAR to simulates Ctrl-V */
SendMessage
(
hwndRichEdit
,
WM_CHAR
,
22
,
(
MapVirtualKey
(
'V'
,
MAPVK_VK_TO_VSC
)
<<
16
)
&
1
);
(
MapVirtualKey
(
'V'
,
MAPVK_VK_TO_VSC
)
<<
16
)
|
1
);
SendMessage
(
hwndRichEdit
,
WM_GETTEXT
,
1024
,
(
LPARAM
)
buffer
);
/* Shouldn't paste because pasting is handled by WM_KEYDOWN */
result
=
strcmp
(
buffer
,
""
);
...
...
@@ -4753,7 +4753,7 @@ static void test_WM_PASTE(void)
/* Simulates paste (Ctrl-V) */
hold_key
(
VK_CONTROL
);
SendMessage
(
hwndRichEdit
,
WM_KEYDOWN
,
'V'
,
(
MapVirtualKey
(
'V'
,
MAPVK_VK_TO_VSC
)
<<
16
)
&
1
);
(
MapVirtualKey
(
'V'
,
MAPVK_VK_TO_VSC
)
<<
16
)
|
1
);
release_key
(
VK_CONTROL
);
SendMessage
(
hwndRichEdit
,
WM_GETTEXT
,
1024
,
(
LPARAM
)
buffer
);
result
=
strcmp
(
buffer
,
"paste"
);
...
...
@@ -4765,7 +4765,7 @@ static void test_WM_PASTE(void)
/* Simulates copy (Ctrl-C) */
hold_key
(
VK_CONTROL
);
SendMessage
(
hwndRichEdit
,
WM_KEYDOWN
,
'C'
,
(
MapVirtualKey
(
'C'
,
MAPVK_VK_TO_VSC
)
<<
16
)
&
1
);
(
MapVirtualKey
(
'C'
,
MAPVK_VK_TO_VSC
)
<<
16
)
|
1
);
release_key
(
VK_CONTROL
);
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
0
);
SendMessage
(
hwndRichEdit
,
WM_PASTE
,
0
,
0
);
...
...
@@ -4779,10 +4779,10 @@ static void test_WM_PASTE(void)
/* Simulates select all (Ctrl-A) */
hold_key
(
VK_CONTROL
);
SendMessage
(
hwndRichEdit
,
WM_KEYDOWN
,
'A'
,
(
MapVirtualKey
(
'A'
,
MAPVK_VK_TO_VSC
)
<<
16
)
&
1
);
(
MapVirtualKey
(
'A'
,
MAPVK_VK_TO_VSC
)
<<
16
)
|
1
);
/* Simulates select cut (Ctrl-X) */
SendMessage
(
hwndRichEdit
,
WM_KEYDOWN
,
'X'
,
(
MapVirtualKey
(
'X'
,
MAPVK_VK_TO_VSC
)
<<
16
)
&
1
);
(
MapVirtualKey
(
'X'
,
MAPVK_VK_TO_VSC
)
<<
16
)
|
1
);
release_key
(
VK_CONTROL
);
SendMessage
(
hwndRichEdit
,
WM_GETTEXT
,
1024
,
(
LPARAM
)
buffer
);
result
=
strcmp
(
buffer
,
""
);
...
...
@@ -4797,14 +4797,14 @@ static void test_WM_PASTE(void)
/* Simulates undo (Ctrl-Z) */
hold_key
(
VK_CONTROL
);
SendMessage
(
hwndRichEdit
,
WM_KEYDOWN
,
'Z'
,
(
MapVirtualKey
(
'Z'
,
MAPVK_VK_TO_VSC
)
<<
16
)
&
1
);
(
MapVirtualKey
(
'Z'
,
MAPVK_VK_TO_VSC
)
<<
16
)
|
1
);
SendMessage
(
hwndRichEdit
,
WM_GETTEXT
,
1024
,
(
LPARAM
)
buffer
);
result
=
strcmp
(
buffer
,
""
);
ok
(
result
==
0
,
"test paste: strcmp = %i, actual = '%s'
\n
"
,
result
,
buffer
);
/* Simulates redo (Ctrl-Y) */
SendMessage
(
hwndRichEdit
,
WM_KEYDOWN
,
'Y'
,
(
MapVirtualKey
(
'Y'
,
MAPVK_VK_TO_VSC
)
<<
16
)
&
1
);
(
MapVirtualKey
(
'Y'
,
MAPVK_VK_TO_VSC
)
<<
16
)
|
1
);
SendMessage
(
hwndRichEdit
,
WM_GETTEXT
,
1024
,
(
LPARAM
)
buffer
);
result
=
strcmp
(
buffer
,
"cut
\r\n
"
);
todo_wine
ok
(
result
==
0
,
...
...
@@ -6418,7 +6418,7 @@ static void test_WM_GETDLGCODE(void)
msg
.
message
=
WM_KEYDOWN
;
msg
.
wParam
=
VK_RETURN
;
msg
.
lParam
=
MapVirtualKey
(
VK_RETURN
,
MAPVK_VK_TO_VSC
)
|
0x0001
;
msg
.
lParam
=
(
MapVirtualKey
(
VK_RETURN
,
MAPVK_VK_TO_VSC
)
<<
16
)
|
0x0001
;
msg
.
pt
.
x
=
0
;
msg
.
pt
.
y
=
0
;
msg
.
time
=
GetTickCount
();
...
...
@@ -6468,7 +6468,7 @@ static void test_WM_GETDLGCODE(void)
DestroyWindow
(
hwnd
);
msg
.
wParam
=
VK_TAB
;
msg
.
lParam
=
MapVirtualKey
(
VK_TAB
,
MAPVK_VK_TO_VSC
)
|
0x0001
;
msg
.
lParam
=
(
MapVirtualKey
(
VK_TAB
,
MAPVK_VK_TO_VSC
)
<<
16
)
|
0x0001
;
hwnd
=
CreateWindowEx
(
0
,
RICHEDIT_CLASS
,
NULL
,
ES_MULTILINE
|
WS_POPUP
,
...
...
@@ -6519,7 +6519,7 @@ static void test_WM_GETDLGCODE(void)
release_key
(
VK_CONTROL
);
msg
.
wParam
=
'a'
;
msg
.
lParam
=
MapVirtualKey
(
'a'
,
MAPVK_VK_TO_VSC
)
|
0x0001
;
msg
.
lParam
=
(
MapVirtualKey
(
'a'
,
MAPVK_VK_TO_VSC
)
<<
16
)
|
0x0001
;
hwnd
=
CreateWindowEx
(
0
,
RICHEDIT_CLASS
,
NULL
,
ES_MULTILINE
|
WS_POPUP
,
...
...
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