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
65272a4f
Commit
65272a4f
authored
May 02, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
May 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: Add a test for SetCooperativeLevel() window styles.
parent
0293e199
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
0 deletions
+51
-0
d3d.c
dlls/ddraw/tests/d3d.c
+51
-0
No files found.
dlls/ddraw/tests/d3d.c
View file @
65272a4f
...
...
@@ -3874,6 +3874,56 @@ static void BackBuffer3DAttachmentTest(void)
DestroyWindow
(
window
);
}
static
void
test_window_style
(
void
)
{
LONG
style
,
exstyle
,
tmp
;
RECT
fullscreen_rect
,
r
;
IDirectDraw7
*
ddraw7
;
HWND
window
;
HRESULT
hr
;
ULONG
ref
;
hr
=
pDirectDrawCreateEx
(
NULL
,
(
void
**
)
&
ddraw7
,
&
IID_IDirectDraw7
,
NULL
);
if
(
FAILED
(
hr
))
{
skip
(
"Failed to create IDirectDraw7 object (%#x), skipping tests.
\n
"
,
hr
);
return
;
}
window
=
CreateWindowA
(
"static"
,
"d3d7_test"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
100
,
100
,
0
,
0
,
0
,
0
);
style
=
GetWindowLongA
(
window
,
GWL_STYLE
);
exstyle
=
GetWindowLongA
(
window
,
GWL_EXSTYLE
);
SetRect
(
&
fullscreen_rect
,
0
,
0
,
GetSystemMetrics
(
SM_CXSCREEN
),
GetSystemMetrics
(
SM_CYSCREEN
));
hr
=
IDirectDraw7_SetCooperativeLevel
(
ddraw7
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"SetCooperativeLevel failed, hr %#x.
\n
"
,
hr
);
if
(
FAILED
(
hr
))
{
IDirectDraw7_Release
(
ddraw7
);
DestroyWindow
(
window
);
return
;
}
tmp
=
GetWindowLongA
(
window
,
GWL_STYLE
);
todo_wine
ok
(
tmp
==
style
,
"Expected window style %#x, got %#x.
\n
"
,
style
,
tmp
);
tmp
=
GetWindowLongA
(
window
,
GWL_EXSTYLE
);
todo_wine
ok
(
tmp
==
exstyle
,
"Expected window extended style %#x, got %#x.
\n
"
,
exstyle
,
tmp
);
GetWindowRect
(
window
,
&
r
);
ok
(
EqualRect
(
&
r
,
&
fullscreen_rect
),
"Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.
\n
"
,
fullscreen_rect
.
left
,
fullscreen_rect
.
top
,
fullscreen_rect
.
right
,
fullscreen_rect
.
bottom
,
r
.
left
,
r
.
top
,
r
.
right
,
r
.
bottom
);
GetClientRect
(
window
,
&
r
);
todo_wine
ok
(
!
EqualRect
(
&
r
,
&
fullscreen_rect
),
"Client rect and window rect are equal.
\n
"
);
ref
=
IDirectDraw7_Release
(
ddraw7
);
ok
(
ref
==
0
,
"The ddraw object was not properly freed: refcount %u.
\n
"
,
ref
);
DestroyWindow
(
window
);
}
START_TEST
(
d3d
)
{
init_function_pointers
();
...
...
@@ -3915,4 +3965,5 @@ START_TEST(d3d)
}
test_wndproc
();
test_window_style
();
}
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