ReactOS 0.4.15-dev-5672-gf73ac17
NtGdiExtTextOutW.c File Reference
#include <win32nt.h>
Include dependency graph for NtGdiExtTextOutW.c:

Go to the source code of this file.

Functions

 START_TEST (NtGdiExtTextOutW)
 

Function Documentation

◆ START_TEST()

START_TEST ( NtGdiExtTextOutW  )

Definition at line 25 of file NtGdiExtTextOutW.c.

26{
28 HWND hWnd;
29 HDC hDC;
30 RECT rect;
32 BOOL ret;
33 ULONG len;
34 INT Dx[10] = {10, -5, 10, 5, 10, -10, 10, 5, 10, 5};
35
36 /* Create a window */
37 hWnd = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
39 NULL, NULL, hinst, 0);
40 hDC = GetDC(hWnd);
41
42 lpstr = L"Hallo";
44
45 ret = NtGdiExtTextOutW(hDC, 0, 0, 0, &rect, lpstr, len, Dx, 0);
46 ok_int(ret, 1);
47
48 ret = NtGdiExtTextOutW(hDC, 0, 0, ETO_PDY, &rect, lpstr, len, Dx, 0);
49 ok_int(ret, 1);
50
51 /* Test invalid lpDx */
52 ret = NtGdiExtTextOutW(hDC, 0, 0, 0, 0, lpstr, len, (INT*)((ULONG_PTR)-1), 0);
53 ok_int(ret, 0);
54
55 /* Test alignment requirement for lpDx */
56 ret = NtGdiExtTextOutW(hDC, 0, 0, 0, 0, lpstr, len, (INT*)((ULONG_PTR)Dx + 1), 0);
57 ok_int(ret, 0);
58}
static HDC hDC
Definition: 3dtext.c:33
#define ok_int(expression, result)
Definition: atltest.h:134
HWND hWnd
Definition: settings.c:17
#define NULL
Definition: types.h:112
#define lstrlenW
Definition: compat.h:750
unsigned int BOOL
Definition: ntddk_ex.h:94
GLenum GLsizei len
Definition: glext.h:6722
static HINSTANCE hinst
Definition: edit.c:551
static HDC
Definition: imagelist.c:92
static LPCSTR lpstr
Definition: font.c:51
__kernel_entry W32KAPI BOOL APIENTRY NtGdiExtTextOutW(_In_ HDC hdc, _In_ INT x, _In_ INT y, _In_ UINT flOpts, _In_opt_ LPRECT prcl, _In_reads_opt_(cwc) LPWSTR pwsz, _In_range_(0, 0xffff) INT cwc, _In_reads_opt_(_Inexpressible_(cwc)) LPINT pdx, _In_ DWORD dwCodePage)
#define L(x)
Definition: ntvdm.h:50
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
#define WS_VISIBLE
Definition: pedump.c:620
& rect
Definition: startmenu.cpp:1413
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
int ret
#define GetModuleHandle
Definition: winbase.h:3698
#define ETO_PDY
Definition: wingdi.h:657
HDC WINAPI GetDC(_In_opt_ HWND)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4306
#define CW_USEDEFAULT
Definition: winuser.h:225
WCHAR * LPWSTR
Definition: xmlstorage.h:184