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
0b069106
Commit
0b069106
authored
Nov 04, 2022
by
Evan Tang
Committed by
Alexandre Julliard
Nov 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Add test for EN_CHANGE events during window creation.
GenoPro isn't very happy if it receives one
parent
f9083961
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
editor.c
dlls/riched20/tests/editor.c
+42
-0
No files found.
dlls/riched20/tests/editor.c
View file @
0b069106
...
...
@@ -8913,6 +8913,47 @@ static void fill_reobject_struct(REOBJECT *reobj, LONG cp, LPOLEOBJECT poleobj,
reobj
->
dwUser
=
user
;
}
static
BOOL
change_received
=
FALSE
;
static
LRESULT
WINAPI
ChangeWatcherWndProc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
if
(
message
==
WM_COMMAND
&&
(
wParam
>>
16
)
==
EN_CHANGE
)
change_received
=
TRUE
;
return
DefWindowProcA
(
hwnd
,
message
,
wParam
,
lParam
);
}
static
LRESULT
WINAPI
RichEditWithEventsWndProc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
if
(
message
==
WM_CREATE
)
SendMessageA
(
hwnd
,
EM_SETEVENTMASK
,
0
,
ENM_CHANGE
);
return
CallWindowProcA
(
richeditProc
,
hwnd
,
message
,
wParam
,
lParam
);
}
static
void
test_init_messages
(
void
)
{
WNDCLASSA
cls
;
HWND
parent
,
edit
;
/* register class to capture EN_CHANGE */
cls
=
make_simple_class
(
ChangeWatcherWndProc
,
"ChangeWatcherClass"
);
if
(
!
RegisterClassA
(
&
cls
))
assert
(
0
);
/* and a class that sets ENM_CHANGE during WM_CREATE */
if
(
!
GetClassInfoA
(
hmoduleRichEdit
,
RICHEDIT_CLASS20A
,
&
cls
))
return
;
richeditProc
=
cls
.
lpfnWndProc
;
cls
.
lpfnWndProc
=
RichEditWithEventsWndProc
;
cls
.
lpszClassName
=
"RichEditWithEvents"
;
if
(
!
RegisterClassA
(
&
cls
))
assert
(
0
);
parent
=
CreateWindowA
(
"ChangeWatcherClass"
,
NULL
,
WS_POPUP
|
WS_VISIBLE
,
0
,
0
,
200
,
60
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
parent
!=
0
,
"Failed to create parent window
\n
"
);
change_received
=
FALSE
;
edit
=
new_window
(
"RichEditWithEvents"
,
0
,
parent
);
todo_wine
ok
(
change_received
==
FALSE
,
"Creating a RichEdit should not make any EN_CHANGE events
\n
"
);
DestroyWindow
(
edit
);
DestroyWindow
(
parent
);
}
static
void
test_EM_SELECTIONTYPE
(
void
)
{
HWND
hwnd
=
new_richedit
(
NULL
);
...
...
@@ -9091,6 +9132,7 @@ START_TEST( editor )
test_background
();
test_eop_char_fmt
();
test_para_numbering
();
test_init_messages
();
test_EM_SELECTIONTYPE
();
/* Set the environment variable WINETEST_RICHED20 to keep windows
...
...
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