ReactOS 0.4.15-dev-8614-gbc76250
SetWindowPlacement.c File Reference
#include "precomp.h"
Include dependency graph for SetWindowPlacement.c:

Go to the source code of this file.

Functions

 START_TEST (SetWindowPlacement)
 

Function Documentation

◆ START_TEST()

START_TEST ( SetWindowPlacement  )

Definition at line 10 of file SetWindowPlacement.c.

11{
12 HWND hwnd;
13 WINDOWPLACEMENT wndpl;
14 BOOL ret;
15
16 hwnd = CreateWindowW(L"BUTTON", L"Button", WS_POPUPWINDOW, 0, 0, 100, 100,
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);
36
37 SetLastError(0xDEADFACE);
38 wndpl.length = sizeof(wndpl);
39 ret = SetWindowPlacement(hwnd, &wndpl);
40 ok_int(ret, TRUE);
42
44}
#define ok_err(error)
Definition: atltest.h:124
#define ok_int(expression, result)
Definition: atltest.h:134
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
unsigned int BOOL
Definition: ntddk_ex.h:94
#define L(x)
Definition: ntvdm.h:50
#define WS_POPUPWINDOW
Definition: pedump.c:638
int ret
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
BOOL WINAPI GetWindowPlacement(_In_ HWND, _Inout_ WINDOWPLACEMENT *)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4319
BOOL WINAPI SetWindowPlacement(_In_ HWND hWnd, _In_ const WINDOWPLACEMENT *)
BOOL WINAPI DestroyWindow(_In_ HWND)