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
96342334
Commit
96342334
authored
Apr 29, 2004
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 29, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test for creation of a maximized child window.
parent
c3b8a20e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
msg.c
dlls/user/tests/msg.c
+50
-0
No files found.
dlls/user/tests/msg.c
View file @
96342334
...
@@ -165,6 +165,23 @@ static const struct message WmCreateChildSeq[] = {
...
@@ -165,6 +165,23 @@ static const struct message WmCreateChildSeq[] = {
{
WM_PARENTNOTIFY
,
sent
|
parent
|
wparam
,
1
},
{
WM_PARENTNOTIFY
,
sent
|
parent
|
wparam
,
1
},
{
0
}
{
0
}
};
};
/* CreateWindow (for maximized child window, not initially visible) */
static
const
struct
message
WmCreateMaximizedChildSeq
[]
=
{
{
HCBT_CREATEWND
,
hook
},
{
WM_NCCREATE
,
sent
},
{
WM_NCCALCSIZE
,
sent
|
wparam
,
0
},
{
WM_CREATE
,
sent
},
{
WM_SIZE
,
sent
},
{
WM_MOVE
,
sent
},
{
HCBT_MINMAX
,
hook
|
lparam
,
0
,
SW_MAXIMIZE
},
{
WM_GETMINMAXINFO
,
sent
},
{
WM_WINDOWPOSCHANGING
,
sent
},
{
WM_NCCALCSIZE
,
sent
},
{
WM_WINDOWPOSCHANGED
,
sent
},
{
WM_SIZE
,
sent
|
defwinproc
},
{
WM_PARENTNOTIFY
,
sent
|
parent
|
wparam
,
1
},
{
0
}
};
/* ShowWindow (for child window) */
/* ShowWindow (for child window) */
static
const
struct
message
WmShowChildSeq
[]
=
{
static
const
struct
message
WmShowChildSeq
[]
=
{
{
WM_SHOWWINDOW
,
sent
|
wparam
,
1
},
{
WM_SHOWWINDOW
,
sent
|
wparam
,
1
},
...
@@ -587,6 +604,13 @@ static void test_messages(void)
...
@@ -587,6 +604,13 @@ static void test_messages(void)
ok
(
hparent
!=
0
,
"Failed to create parent window
\n
"
);
ok
(
hparent
!=
0
,
"Failed to create parent window
\n
"
);
flush_sequence
();
flush_sequence
();
hchild
=
CreateWindowExA
(
0
,
"TestWindowClass"
,
"Test child"
,
WS_CHILD
|
WS_MAXIMIZE
,
0
,
0
,
10
,
10
,
hparent
,
0
,
0
,
NULL
);
ok
(
hchild
!=
0
,
"Failed to create child window
\n
"
);
ok_sequence
(
WmCreateMaximizedChildSeq
,
"CreateWindow:maximized child"
);
DestroyWindow
(
hchild
);
flush_sequence
();
hchild
=
CreateWindowExA
(
0
,
"TestWindowClass"
,
"Test child"
,
WS_CHILDWINDOW
,
hchild
=
CreateWindowExA
(
0
,
"TestWindowClass"
,
"Test child"
,
WS_CHILDWINDOW
,
0
,
0
,
10
,
10
,
hparent
,
0
,
0
,
NULL
);
0
,
0
,
10
,
10
,
hparent
,
0
,
0
,
NULL
);
ok
(
hchild
!=
0
,
"Failed to create child window
\n
"
);
ok
(
hchild
!=
0
,
"Failed to create child window
\n
"
);
...
@@ -711,6 +735,32 @@ static LRESULT WINAPI MsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam, LPAR
...
@@ -711,6 +735,32 @@ static LRESULT WINAPI MsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam, LPAR
msg
.
lParam
=
lParam
;
msg
.
lParam
=
lParam
;
add_message
(
&
msg
);
add_message
(
&
msg
);
if
(
message
==
WM_GETMINMAXINFO
&&
(
GetWindowLongA
(
hwnd
,
GWL_STYLE
)
&
WS_CHILD
))
{
HWND
parent
=
GetParent
(
hwnd
);
RECT
rc
;
MINMAXINFO
*
minmax
=
(
MINMAXINFO
*
)
lParam
;
GetClientRect
(
parent
,
&
rc
);
trace
(
"parent %p client size = (%ld x %ld)
\n
"
,
parent
,
rc
.
right
,
rc
.
bottom
);
trace
(
"ptReserved = (%ld,%ld)
\n
"
"ptMaxSize = (%ld,%ld)
\n
"
"ptMaxPosition = (%ld,%ld)
\n
"
"ptMinTrackSize = (%ld,%ld)
\n
"
"ptMaxTrackSize = (%ld,%ld)
\n
"
,
minmax
->
ptReserved
.
x
,
minmax
->
ptReserved
.
y
,
minmax
->
ptMaxSize
.
x
,
minmax
->
ptMaxSize
.
y
,
minmax
->
ptMaxPosition
.
x
,
minmax
->
ptMaxPosition
.
y
,
minmax
->
ptMinTrackSize
.
x
,
minmax
->
ptMinTrackSize
.
y
,
minmax
->
ptMaxTrackSize
.
x
,
minmax
->
ptMaxTrackSize
.
y
);
ok
(
minmax
->
ptMaxSize
.
x
==
rc
.
right
,
"default width of maximized child %ld != %ld
\n
"
,
minmax
->
ptMaxSize
.
x
,
rc
.
right
);
ok
(
minmax
->
ptMaxSize
.
y
==
rc
.
bottom
,
"default height of maximized child %ld != %ld
\n
"
,
minmax
->
ptMaxSize
.
y
,
rc
.
bottom
);
}
defwndproc_counter
++
;
defwndproc_counter
++
;
ret
=
DefWindowProcA
(
hwnd
,
message
,
wParam
,
lParam
);
ret
=
DefWindowProcA
(
hwnd
,
message
,
wParam
,
lParam
);
defwndproc_counter
--
;
defwndproc_counter
--
;
...
...
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