ReactOS  0.4.14-dev-376-gaedba84
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;
31  LPWSTR lpstr;
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,
38  CW_USEDEFAULT, CW_USEDEFAULT, 100, 100,
39  NULL, NULL, hinst, 0);
40  hDC = GetDC(hWnd);
41 
42  lpstr = L"Hallo";
43  len = wcslen(lpstr);
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, 1);
58 }
HDC WINAPI GetDC(_In_opt_ HWND)
__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)
static HDC
Definition: imagelist.c:92
HWND hWnd
Definition: settings.c:17
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4217
int32_t INT
Definition: typedefs.h:56
& rect
Definition: startmenu.cpp:1413
uint32_t ULONG_PTR
Definition: typedefs.h:63
unsigned int BOOL
Definition: ntddk_ex.h:94
#define CW_USEDEFAULT
Definition: winuser.h:225
smooth NULL
Definition: ftsmooth.c:416
#define ok_int(expression, result)
Definition: atltest.h:134
int ret
static const WCHAR L[]
Definition: oid.c:1250
GLenum GLsizei len
Definition: glext.h:6722
static HDC hDC
Definition: 3dtext.c:33
#define GetModuleHandle
Definition: winbase.h:3651
#define ETO_PDY
Definition: wingdi.h:656
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
unsigned int ULONG
Definition: retypes.h:1
static HINSTANCE hinst
Definition: edit.c:551
static LPCSTR lpstr
Definition: font.c:51
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define WS_VISIBLE
Definition: pedump.c:620
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)