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
992381b3
Commit
992381b3
authored
Sep 30, 2009
by
Dylan Smith
Committed by
Alexandre Julliard
Sep 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Added test to show that handle to parent is cached.
parent
eb8b1657
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
editor.c
dlls/riched20/tests/editor.c
+26
-0
No files found.
dlls/riched20/tests/editor.c
View file @
992381b3
...
...
@@ -5639,6 +5639,7 @@ static void test_eventMask(void)
static
int
received_WM_NOTIFY
=
0
;
static
int
modify_at_WM_NOTIFY
=
0
;
static
BOOL
filter_on_WM_NOTIFY
=
FALSE
;
static
HWND
hwndRichedit_WM_NOTIFY
;
static
LRESULT
WINAPI
WM_NOTIFY_ParentMsgCheckProcA
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
...
...
@@ -5647,6 +5648,7 @@ static LRESULT WINAPI WM_NOTIFY_ParentMsgCheckProcA(HWND hwnd, UINT message, WPA
{
received_WM_NOTIFY
=
1
;
modify_at_WM_NOTIFY
=
SendMessage
(
hwndRichedit_WM_NOTIFY
,
EM_GETMODIFY
,
0
,
0
);
if
(
filter_on_WM_NOTIFY
)
return
TRUE
;
}
return
DefWindowProcA
(
hwnd
,
message
,
wParam
,
lParam
);
}
...
...
@@ -5656,6 +5658,7 @@ static void test_WM_NOTIFY(void)
HWND
parent
;
WNDCLASSA
cls
;
CHARFORMAT2
cf2
;
int
sel_start
,
sel_end
;
/* register class to capture WM_NOTIFY */
cls
.
style
=
0
;
...
...
@@ -5718,6 +5721,29 @@ static void test_WM_NOTIFY(void)
ok
(
received_WM_NOTIFY
==
1
,
"Expected WM_NOTIFY was NOT sent!
\n
"
);
SendMessage
(
hwndRichedit_WM_NOTIFY
,
WM_SETREDRAW
,
TRUE
,
0
);
/* Test filtering key events. */
SendMessage
(
hwndRichedit_WM_NOTIFY
,
EM_SETSEL
,
0
,
0
);
SendMessage
(
hwndRichedit_WM_NOTIFY
,
EM_SETEVENTMASK
,
0
,
ENM_KEYEVENTS
);
SendMessage
(
hwndRichedit_WM_NOTIFY
,
EM_GETSEL
,
(
WPARAM
)
&
sel_start
,
(
LPARAM
)
&
sel_end
);
received_WM_NOTIFY
=
0
;
SendMessage
(
hwndRichedit_WM_NOTIFY
,
WM_KEYDOWN
,
VK_RIGHT
,
0
);
SendMessage
(
hwndRichedit_WM_NOTIFY
,
EM_GETSEL
,
(
WPARAM
)
&
sel_start
,
(
LPARAM
)
&
sel_end
);
ok
(
sel_start
==
1
&&
sel_end
==
1
,
"selections is incorrectly at (%d,%d)
\n
"
,
sel_start
,
sel_end
);
filter_on_WM_NOTIFY
=
TRUE
;
received_WM_NOTIFY
=
0
;
SendMessage
(
hwndRichedit_WM_NOTIFY
,
WM_KEYDOWN
,
VK_RIGHT
,
0
);
SendMessage
(
hwndRichedit_WM_NOTIFY
,
EM_GETSEL
,
(
WPARAM
)
&
sel_start
,
(
LPARAM
)
&
sel_end
);
ok
(
sel_start
==
1
&&
sel_end
==
1
,
"selections is incorrectly at (%d,%d)
\n
"
,
sel_start
,
sel_end
);
/* test with owner set to NULL */
SetWindowLongPtr
(
hwndRichedit_WM_NOTIFY
,
GWLP_HWNDPARENT
,
0
);
SendMessage
(
hwndRichedit_WM_NOTIFY
,
WM_KEYDOWN
,
VK_RIGHT
,
0
);
SendMessage
(
hwndRichedit_WM_NOTIFY
,
EM_GETSEL
,
(
WPARAM
)
&
sel_start
,
(
LPARAM
)
&
sel_end
);
todo_wine
ok
(
sel_start
==
1
&&
sel_end
==
1
,
"selections is incorrectly at (%d,%d)
\n
"
,
sel_start
,
sel_end
);
DestroyWindow
(
hwndRichedit_WM_NOTIFY
);
DestroyWindow
(
parent
);
}
...
...
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