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
e7aabc64
Commit
e7aabc64
authored
Feb 16, 2016
by
Piotr Caban
Committed by
Alexandre Julliard
Feb 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Add more dialog creation message tests.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
73ee2a8b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
0 deletions
+72
-0
msg.c
dlls/user32/tests/msg.c
+72
-0
No files found.
dlls/user32/tests/msg.c
View file @
e7aabc64
...
...
@@ -11901,6 +11901,47 @@ static INT_PTR WINAPI test_dlg_proc(HWND hwnd, UINT message, WPARAM wParam, LPAR
return
1
;
}
static
WNDPROC
orig_edit_proc
;
static
LRESULT
WINAPI
dlg_creation_edit_proc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wp
,
LPARAM
lp
)
{
struct
recvd_message
msg
;
if
(
ignore_message
(
message
))
return
0
;
msg
.
hwnd
=
hwnd
;
msg
.
message
=
message
;
msg
.
flags
=
sent
|
wparam
|
lparam
;
msg
.
wParam
=
wp
;
msg
.
lParam
=
lp
;
msg
.
descr
=
"edit"
;
add_message
(
&
msg
);
return
CallWindowProcW
(
orig_edit_proc
,
hwnd
,
message
,
wp
,
lp
);
}
static
INT_PTR
WINAPI
test_dlg_proc2
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
struct
recvd_message
msg
;
if
(
ignore_message
(
message
))
return
0
;
msg
.
hwnd
=
hwnd
;
msg
.
message
=
message
;
msg
.
flags
=
sent
|
wparam
|
lparam
|
parent
;
msg
.
wParam
=
wParam
;
msg
.
lParam
=
lParam
;
msg
.
descr
=
"dialog"
;
add_message
(
&
msg
);
if
(
message
==
WM_INITDIALOG
)
{
orig_edit_proc
=
(
WNDPROC
)
SetWindowLongPtrW
(
GetDlgItem
(
hwnd
,
200
),
GWLP_WNDPROC
,
(
LONG_PTR
)
dlg_creation_edit_proc
);
}
return
1
;
}
static
const
struct
message
WmDefDlgSetFocus_1
[]
=
{
{
WM_GETDLGCODE
,
sent
|
wparam
|
lparam
,
0
,
0
},
{
WM_GETTEXTLENGTH
,
sent
|
wparam
|
lparam
|
optional
,
0
,
0
},
/* XP */
...
...
@@ -11959,6 +12000,30 @@ static const struct message WmCreateDialogParamSeq_2[] = {
{
0
}
};
static
const
struct
message
WmCreateDialogParamSeq_3
[]
=
{
{
HCBT_CREATEWND
,
hook
},
{
WM_SETFONT
,
sent
|
parent
},
{
WM_INITDIALOG
,
sent
|
parent
},
{
WM_GETDLGCODE
,
sent
|
wparam
|
lparam
,
0
,
0
},
{
EM_SETSEL
,
sent
|
wparam
|
lparam
,
0
,
INT_MAX
},
{
EM_SETSEL
,
sent
|
wparam
|
lparam
|
optional
,
0
,
INT_MAX
},
{
EM_SETSEL
,
sent
|
wparam
|
lparam
|
optional
,
0
,
INT_MAX
},
{
EM_SETSEL
,
sent
|
wparam
|
lparam
|
optional
,
0
,
INT_MAX
},
{
HCBT_ACTIVATE
,
hook
},
{
WM_QUERYNEWPALETTE
,
sent
|
parent
|
optional
},
/* TODO: this message should not be sent */
{
WM_WINDOWPOSCHANGING
,
sent
|
parent
|
wparam
|
optional
,
SWP_NOSIZE
|
SWP_NOMOVE
},
{
WM_WINDOWPOSCHANGING
,
sent
|
parent
|
wparam
|
optional
,
SWP_NOSIZE
|
SWP_NOMOVE
},
{
WM_ACTIVATEAPP
,
sent
|
parent
|
wparam
,
1
},
{
WM_NCACTIVATE
,
sent
|
parent
},
{
WM_ACTIVATE
,
sent
|
parent
|
wparam
,
1
},
{
WM_SETFOCUS
,
sent
},
{
WM_COMMAND
,
sent
|
parent
|
wparam
,
MAKELONG
(
200
,
EN_SETFOCUS
)
},
{
WM_GETDLGCODE
,
sent
|
wparam
|
lparam
,
0
,
0
},
{
WM_USER
,
sent
|
parent
},
{
WM_CHANGEUISTATE
,
sent
|
parent
|
optional
},
{
0
}
};
static
void
test_dialog_messages
(
void
)
{
WNDCLASSA
cls
;
...
...
@@ -12061,6 +12126,13 @@ static void test_dialog_messages(void)
DestroyWindow
(
hdlg
);
flush_sequence
();
hdlg
=
CreateDialogParamA
(
0
,
"FOCUS_TEST_DIALOG_3"
,
0
,
test_dlg_proc2
,
0
);
ok
(
IsWindow
(
hdlg
),
"CreateDialogParam failed
\n
"
);
ok_sequence
(
WmCreateDialogParamSeq_3
,
"CreateDialogParam_3"
,
TRUE
);
EndDialog
(
hdlg
,
0
);
DestroyWindow
(
hdlg
);
flush_sequence
();
UnregisterClassA
(
cls
.
lpszClassName
,
cls
.
hInstance
);
}
...
...
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