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
c1ed920e
Commit
c1ed920e
authored
Feb 18, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Add another test for dialog creation messages without DefDlgProc.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e7aabc64
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
83 additions
and
0 deletions
+83
-0
msg.c
dlls/user32/tests/msg.c
+74
-0
resource.rc
dlls/user32/tests/resource.rc
+9
-0
No files found.
dlls/user32/tests/msg.c
View file @
c1ed920e
...
...
@@ -11942,6 +11942,35 @@ static INT_PTR WINAPI test_dlg_proc2(HWND hwnd, UINT message, WPARAM wParam, LPA
return
1
;
}
static
INT_PTR
WINAPI
test_dlg_proc3
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
ok
(
0
,
"should not be called since DefDlgProc is not used
\n
"
);
return
0
;
}
static
LRESULT
WINAPI
test_dlg_proc4
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
struct
recvd_message
msg
;
if
(
!
ignore_message
(
message
))
{
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
;
}
return
DefWindowProcW
(
hwnd
,
message
,
wParam
,
lParam
);
}
static
const
struct
message
WmDefDlgSetFocus_1
[]
=
{
{
WM_GETDLGCODE
,
sent
|
wparam
|
lparam
,
0
,
0
},
{
WM_GETTEXTLENGTH
,
sent
|
wparam
|
lparam
|
optional
,
0
,
0
},
/* XP */
...
...
@@ -12024,6 +12053,41 @@ static const struct message WmCreateDialogParamSeq_3[] = {
{
0
}
};
static
const
struct
message
WmCreateDialogParamSeq_4
[]
=
{
{
HCBT_CREATEWND
,
hook
},
{
WM_NCCREATE
,
sent
|
parent
},
{
WM_NCCALCSIZE
,
sent
|
parent
|
wparam
,
0
},
{
WM_CREATE
,
sent
|
parent
},
{
EVENT_OBJECT_CREATE
,
winevent_hook
|
wparam
|
lparam
,
0
,
0
},
{
WM_SIZE
,
sent
|
parent
|
wparam
,
SIZE_RESTORED
},
{
WM_MOVE
,
sent
|
parent
},
{
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
},
{
HCBT_SETFOCUS
,
hook
},
{
WM_SETFOCUS
,
sent
|
parent
},
{
WM_KILLFOCUS
,
sent
|
parent
},
{
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
},
{
WM_UPDATEUISTATE
,
sent
|
parent
|
optional
},
{
WM_UPDATEUISTATE
,
sent
|
optional
},
{
0
}
};
static
void
test_dialog_messages
(
void
)
{
WNDCLASSA
cls
;
...
...
@@ -12133,6 +12197,16 @@ static void test_dialog_messages(void)
DestroyWindow
(
hdlg
);
flush_sequence
();
UnregisterClassA
(
cls
.
lpszClassName
,
cls
.
hInstance
);
cls
.
lpfnWndProc
=
test_dlg_proc4
;
ok
(
RegisterClassA
(
&
cls
),
"failed to register class again
\n
"
);
hdlg
=
CreateDialogParamA
(
0
,
"FOCUS_TEST_DIALOG_4"
,
0
,
test_dlg_proc3
,
0
);
ok
(
IsWindow
(
hdlg
),
"CreateDialogParam failed
\n
"
);
ok_sequence
(
WmCreateDialogParamSeq_4
,
"CreateDialogParam_4"
,
TRUE
);
EndDialog
(
hdlg
,
0
);
DestroyWindow
(
hdlg
);
flush_sequence
();
UnregisterClassA
(
cls
.
lpszClassName
,
cls
.
hInstance
);
}
...
...
dlls/user32/tests/resource.rc
View file @
c1ed920e
...
...
@@ -115,6 +115,15 @@ FONT 8, "MS Shell Dlg"
EDITTEXT 200,4,4,50,14
}
FOCUS_TEST_DIALOG_4 DIALOG 0, 0, 60, 30
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Test dialog"
CLASS "MyDialogClass"
FONT 8, "MS Shell Dlg"
{
EDITTEXT 200,4,4,50,14
}
IDD_DIALOG DIALOG 0, 0, 186, 95
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
...
...
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