ReactOS  0.4.14-dev-358-gbef841c
SetBoundsRect.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS API tests
3  * LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory
4  * PURPOSE: Test for SetBoundsRect
5  * PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org
6  */
7 
8 #include "precomp.h"
9 
11 {
12  HDC hDC;
13  UINT ret;
14  DWORD error;
15 
17  if (hDC == NULL)
18  {
19  skip("No DC\n");
20  return;
21  }
22 
23  SetLastError(0xbeeffeed);
24  ret = SetBoundsRect(hDC, NULL, 0);
25  error = GetLastError();
26  ok(ret == (DCB_DISABLE | DCB_RESET), "ret = %u\n", ret);
27  ok(error == 0xbeeffeed, "error = %lu\n", error);
28 
29  SetLastError(0xbeeffeed);
31  error = GetLastError();
32  ok(ret == (DCB_DISABLE | DCB_RESET), "ret = %u\n", ret);
33  ok(error == 0xbeeffeed, "error = %lu\n", error);
34 
35  SetLastError(0xbeeffeed);
37  error = GetLastError();
38  ok(ret == (DCB_DISABLE | DCB_RESET), "ret = %u\n", ret);
39  ok(error == 0xbeeffeed, "error = %lu\n", error);
40 
41  SetLastError(0xbeeffeed);
43  error = GetLastError();
44  ok(ret == (DCB_DISABLE | DCB_RESET), "ret = %u\n", ret);
45  ok(error == 0xbeeffeed, "error = %lu\n", error);
46 
47  SetLastError(0xbeeffeed);
49  error = GetLastError();
50  ok(ret == (DCB_ENABLE | DCB_RESET), "ret = %u\n", ret);
51  ok(error == 0xbeeffeed, "error = %lu\n", error);
52 
53  DeleteDC(hDC);
54 }
#define error(str)
Definition: mkdosfs.c:1605
HDC WINAPI GetDC(_In_opt_ HWND)
#define DCB_DISABLE
Definition: wingdi.h:684
static HDC
Definition: imagelist.c:92
UINT WINAPI SetBoundsRect(_In_ HDC, _In_opt_ LPCRECT, _In_ UINT)
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
#define DCB_ENABLE
Definition: wingdi.h:685
START_TEST(SetBoundsRect)
Definition: SetBoundsRect.c:10
smooth NULL
Definition: ftsmooth.c:416
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:417
int ret
static HDC hDC
Definition: 3dtext.c:33
BOOL WINAPI DeleteDC(_In_ HDC)
#define ok(value,...)
Definition: atltest.h:57
#define DCB_RESET
Definition: wingdi.h:686
unsigned int UINT
Definition: ndis.h:50
#define skip(...)
Definition: atltest.h:64
#define DCB_ACCUMULATE
Definition: wingdi.h:688