ReactOS 0.4.15-dev-7907-g95bf896
NtGdiExtSelectClipRgn.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS api tests
3 * LICENSE: GPL - See COPYING in the top level directory
4 * PURPOSE: Test for NtGdiExtSelectClipRgn
5 * PROGRAMMERS:
6 */
7
8#include "../win32nt.h"
9
11{
12 HRGN hRgnDest, hRgn1, hRgn2;
13 HDC hdc;
14// test what params are accepted for what operations
15// 0? invalid? are params maybe ignored in some cases?
16// LastError
17
18 /* Preparation */
19 hRgnDest = CreateRectRgn(100, 100, 100, 100);
20 hRgn1 = CreateRectRgn(1,1,4,4);
21 hRgn2 = CreateRectRgn(2,2,6,3);
22
23 hdc = GetDC(NULL);
24
25 /* RGN_AND = 1, RGN_OR = 2, RGN_XOR = 3, RGN_DIFF = 4, RGN_COPY = 5 */
26
27 SetLastError(0xDEADFACE);
30 SetLastError(0xDEADFACE);
33 SetLastError(0xDEADFACE);
50 SetLastError(0xDEADFACE);
55 ok_long(GetLastError(), 0xDEADFACE);
57}
#define ok_long(expression, result)
Definition: atltest.h:133
#define START_TEST(x)
Definition: atltest.h:75
#define ok_int(expression, result)
Definition: atltest.h:134
#define NULL
Definition: types.h:112
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
#define ERROR(name)
Definition: error_private.h:53
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:92
__kernel_entry W32KAPI INT APIENTRY NtGdiExtSelectClipRgn(_In_ HDC hdc, _In_opt_ HRGN hrgn, _In_ INT iMode)
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define COMPLEXREGION
Definition: wingdi.h:363
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
#define RGN_DIFF
Definition: wingdi.h:358
#define NULLREGION
Definition: wingdi.h:361
#define RGN_COPY
Definition: wingdi.h:357
#define RGN_AND
Definition: wingdi.h:356
#define SIMPLEREGION
Definition: wingdi.h:362
#define RGN_XOR
Definition: wingdi.h:360
#define RGN_OR
Definition: wingdi.h:359
HDC WINAPI GetDC(_In_opt_ HWND)