ReactOS
0.4.16-dev-555-g690643f
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
SetWindowPlacement.c
Go to the documentation of this file.
1
/*
2
* PROJECT: ReactOS API tests
3
* LICENSE: LGPL-2.1+ (https://spdx.org/licenses/LGPL-2.1+)
4
* PURPOSE: Tests for Get/SetWindowPlacement
5
* COPYRIGHT: Copyright 2024 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
6
*/
7
8
#include "
precomp.h
"
9
10
START_TEST
(
SetWindowPlacement
)
11
{
12
HWND
hwnd
;
13
WINDOWPLACEMENT
wndpl;
14
BOOL
ret
;
15
16
hwnd
=
CreateWindowW
(
L
"BUTTON"
,
L
"Button"
,
WS_POPUPWINDOW
, 0, 0, 100, 100,
17
NULL
,
NULL
,
GetModuleHandleW
(
NULL
),
NULL
);
18
19
SetLastError
(0xDEADFACE);
20
wndpl.
length
= 0xFFFF;
21
ret
=
GetWindowPlacement
(
hwnd
, &wndpl);
22
ok_int
(
ret
,
TRUE
);
23
ok_err
(0xDEADFACE);
24
25
SetLastError
(0xDEADFACE);
26
wndpl.
length
=
sizeof
(wndpl);
27
ret
=
GetWindowPlacement
(
hwnd
, &wndpl);
28
ok_int
(
ret
,
TRUE
);
29
ok_err
(0xDEADFACE);
30
31
SetLastError
(0xDEADFACE);
32
wndpl.
length
= 0xFFFF;
33
ret
=
SetWindowPlacement
(
hwnd
, &wndpl);
34
ok_int
(
ret
,
FALSE
);
35
ok_err
(
ERROR_INVALID_PARAMETER
);
36
37
SetLastError
(0xDEADFACE);
38
wndpl.
length
=
sizeof
(wndpl);
39
ret
=
SetWindowPlacement
(
hwnd
, &wndpl);
40
ok_int
(
ret
,
TRUE
);
41
ok_err
(
ERROR_SUCCESS
);
42
43
DestroyWindow
(
hwnd
);
44
}
ok_err
#define ok_err(error)
Definition:
atltest.h:124
START_TEST
#define START_TEST(x)
Definition:
atltest.h:75
ok_int
#define ok_int(expression, result)
Definition:
atltest.h:134
ERROR_SUCCESS
#define ERROR_SUCCESS
Definition:
deptool.c:10
NULL
#define NULL
Definition:
types.h:112
TRUE
#define TRUE
Definition:
types.h:120
FALSE
#define FALSE
Definition:
types.h:117
ERROR_INVALID_PARAMETER
#define ERROR_INVALID_PARAMETER
Definition:
compat.h:101
SetLastError
#define SetLastError(x)
Definition:
compat.h:752
GetModuleHandleW
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition:
loader.c:838
BOOL
unsigned int BOOL
Definition:
ntddk_ex.h:94
void
Definition:
nsiface.idl:2307
L
#define L(x)
Definition:
ntvdm.h:50
WS_POPUPWINDOW
#define WS_POPUPWINDOW
Definition:
pedump.c:638
_WINDOWPLACEMENT
Definition:
winuser.h:3292
_WINDOWPLACEMENT::length
UINT length
Definition:
winuser.h:3293
ret
int ret
Definition:
wcstombs-tests.c:31
precomp.h
hwnd
_In_ LONG _In_ HWND hwnd
Definition:
winddi.h:4023
GetWindowPlacement
BOOL WINAPI GetWindowPlacement(_In_ HWND, _Inout_ WINDOWPLACEMENT *)
CreateWindowW
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition:
winuser.h:4319
SetWindowPlacement
BOOL WINAPI SetWindowPlacement(_In_ HWND hWnd, _In_ const WINDOWPLACEMENT *)
DestroyWindow
BOOL WINAPI DestroyWindow(_In_ HWND)
modules
rostests
apitests
user32
SetWindowPlacement.c
Generated on Tue Jan 21 2025 06:08:06 for ReactOS by
1.9.6