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
f9083961
Commit
f9083961
authored
Nov 07, 2022
by
Evan Tang
Committed by
Alexandre Julliard
Nov 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Move test class creation to a helper function.
parent
21219fa3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
50 deletions
+21
-50
editor.c
dlls/riched20/tests/editor.c
+21
-50
No files found.
dlls/riched20/tests/editor.c
View file @
f9083961
...
...
@@ -110,6 +110,22 @@ static HWND new_richeditW(HWND parent) {
return
new_windowW
(
RICHEDIT_CLASS20W
,
ES_MULTILINE
,
parent
);
}
static
WNDCLASSA
make_simple_class
(
WNDPROC
wndproc
,
LPCSTR
lpClassName
)
{
WNDCLASSA
cls
;
cls
.
style
=
0
;
cls
.
lpfnWndProc
=
wndproc
;
cls
.
cbClsExtra
=
0
;
cls
.
cbWndExtra
=
0
;
cls
.
hInstance
=
GetModuleHandleA
(
0
);
cls
.
hIcon
=
0
;
cls
.
hCursor
=
LoadCursorA
(
0
,
(
LPCSTR
)
IDC_ARROW
);
cls
.
hbrBackground
=
GetStockObject
(
WHITE_BRUSH
);
cls
.
lpszMenuName
=
NULL
;
cls
.
lpszClassName
=
lpClassName
;
return
cls
;
}
/* Keeps the window reponsive for the deley_time in seconds.
* This is useful for debugging a test to see what is happening. */
static
void
keep_responsive
(
time_t
delay_time
)
...
...
@@ -4070,16 +4086,7 @@ static void test_EM_SETTEXTEX(void)
* For some reason the scroll position is 0 after EM_SETTEXTEX
* with the ST_SELECTION flag only when the control has a parent
* window, even though the selection is at the end. */
cls
.
style
=
0
;
cls
.
lpfnWndProc
=
DefWindowProcA
;
cls
.
cbClsExtra
=
0
;
cls
.
cbWndExtra
=
0
;
cls
.
hInstance
=
GetModuleHandleA
(
0
);
cls
.
hIcon
=
0
;
cls
.
hCursor
=
LoadCursorA
(
0
,
(
LPCSTR
)
IDC_ARROW
);
cls
.
hbrBackground
=
GetStockObject
(
WHITE_BRUSH
);
cls
.
lpszMenuName
=
NULL
;
cls
.
lpszClassName
=
"ParentTestClass"
;
cls
=
make_simple_class
(
DefWindowProcA
,
"ParentTestClass"
);
if
(
!
RegisterClassA
(
&
cls
))
assert
(
0
);
parent
=
CreateWindowA
(
cls
.
lpszClassName
,
NULL
,
WS_POPUP
|
WS_VISIBLE
,
...
...
@@ -6599,16 +6606,7 @@ static void test_eventMask(void)
int
eventMask
;
/* register class to capture WM_COMMAND */
cls
.
style
=
0
;
cls
.
lpfnWndProc
=
ParentMsgCheckProcA
;
cls
.
cbClsExtra
=
0
;
cls
.
cbWndExtra
=
0
;
cls
.
hInstance
=
GetModuleHandleA
(
0
);
cls
.
hIcon
=
0
;
cls
.
hCursor
=
LoadCursorA
(
0
,
(
LPCSTR
)
IDC_ARROW
);
cls
.
hbrBackground
=
GetStockObject
(
WHITE_BRUSH
);
cls
.
lpszMenuName
=
NULL
;
cls
.
lpszClassName
=
"EventMaskParentClass"
;
cls
=
make_simple_class
(
ParentMsgCheckProcA
,
"EventMaskParentClass"
);
if
(
!
RegisterClassA
(
&
cls
))
assert
(
0
);
parent
=
CreateWindowA
(
cls
.
lpszClassName
,
NULL
,
WS_POPUP
|
WS_VISIBLE
,
...
...
@@ -6692,16 +6690,7 @@ static void test_WM_NOTIFY(void)
int
sel_start
,
sel_end
;
/* register class to capture WM_NOTIFY */
cls
.
style
=
0
;
cls
.
lpfnWndProc
=
WM_NOTIFY_ParentMsgCheckProcA
;
cls
.
cbClsExtra
=
0
;
cls
.
cbWndExtra
=
0
;
cls
.
hInstance
=
GetModuleHandleA
(
0
);
cls
.
hIcon
=
0
;
cls
.
hCursor
=
LoadCursorA
(
0
,
(
LPCSTR
)
IDC_ARROW
);
cls
.
hbrBackground
=
GetStockObject
(
WHITE_BRUSH
);
cls
.
lpszMenuName
=
NULL
;
cls
.
lpszClassName
=
"WM_NOTIFY_ParentClass"
;
cls
=
make_simple_class
(
WM_NOTIFY_ParentMsgCheckProcA
,
"WM_NOTIFY_ParentClass"
);
if
(
!
RegisterClassA
(
&
cls
))
assert
(
0
);
parent
=
CreateWindowA
(
cls
.
lpszClassName
,
NULL
,
WS_POPUP
|
WS_VISIBLE
,
...
...
@@ -6927,16 +6916,7 @@ static void test_EN_LINK(void)
};
/* register class to capture WM_NOTIFY */
cls
.
style
=
0
;
cls
.
lpfnWndProc
=
EN_LINK_ParentMsgCheckProcA
;
cls
.
cbClsExtra
=
0
;
cls
.
cbWndExtra
=
0
;
cls
.
hInstance
=
GetModuleHandleA
(
0
);
cls
.
hIcon
=
0
;
cls
.
hCursor
=
LoadCursorA
(
0
,
(
LPCSTR
)
IDC_ARROW
);
cls
.
hbrBackground
=
GetStockObject
(
WHITE_BRUSH
);
cls
.
lpszMenuName
=
NULL
;
cls
.
lpszClassName
=
"EN_LINK_ParentClass"
;
cls
=
make_simple_class
(
EN_LINK_ParentMsgCheckProcA
,
"EN_LINK_ParentClass"
);
if
(
!
RegisterClassA
(
&
cls
))
assert
(
0
);
parent
=
CreateWindowA
(
cls
.
lpszClassName
,
NULL
,
WS_POPUP
|
WS_VISIBLE
,
...
...
@@ -7973,16 +7953,7 @@ static void test_dialogmode(void)
int
lcount
,
r
;
WNDCLASSA
cls
;
cls
.
style
=
0
;
cls
.
lpfnWndProc
=
dialog_mode_wnd_proc
;
cls
.
cbClsExtra
=
0
;
cls
.
cbWndExtra
=
0
;
cls
.
hInstance
=
GetModuleHandleA
(
0
);
cls
.
hIcon
=
0
;
cls
.
hCursor
=
LoadCursorA
(
0
,
(
LPCSTR
)
IDC_ARROW
);
cls
.
hbrBackground
=
GetStockObject
(
WHITE_BRUSH
);
cls
.
lpszMenuName
=
NULL
;
cls
.
lpszClassName
=
"DialogModeParentClass"
;
cls
=
make_simple_class
(
dialog_mode_wnd_proc
,
"DialogModeParentClass"
);
if
(
!
RegisterClassA
(
&
cls
))
assert
(
0
);
hwParent
=
CreateWindowA
(
"DialogModeParentClass"
,
NULL
,
WS_OVERLAPPEDWINDOW
,
...
...
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