ReactOS 0.4.15-dev-8241-g63935f8
GetTextExtentExPoint.c File Reference
#include "precomp.h"
Include dependency graph for GetTextExtentExPoint.c:

Go to the source code of this file.

Functions

void Test_GetTextExtentExPoint ()
 
 START_TEST (GetTextExtentExPoint)
 

Function Documentation

◆ START_TEST()

START_TEST ( GetTextExtentExPoint  )

Definition at line 52 of file GetTextExtentExPoint.c.

53{
55}
void Test_GetTextExtentExPoint()

◆ Test_GetTextExtentExPoint()

void Test_GetTextExtentExPoint ( )

Definition at line 11 of file GetTextExtentExPoint.c.

12{
13 INT nFit;
14 SIZE size;
16
17 SetLastError(0);
18
19 result = GetTextExtentExPointA(GetDC(0), "test", 4, 1000, &nFit, NULL, &size);
20 ok_int(result, 1);
21 ok_int(nFit, 4);
22 ok_err(0);
23 printf("nFit = %d\n", nFit);
24
25 result = GetTextExtentExPointA(GetDC(0), "test", 4, 1, &nFit, NULL, &size);
26 ok_int(result, 1);
27 ok_int(nFit, 0);
28 ok_err(0);
29 printf("nFit = %d\n", nFit);
30
31 result = GetTextExtentExPointA(GetDC(0), "test", 4, 0, &nFit, NULL, &size);
32 ok_int(result, 1);
33 ok_int(nFit, 0);
34 ok_err(0);
35
36 result = GetTextExtentExPointA(GetDC(0), "test", 4, -1, &nFit, NULL, &size);
37 ok_int(result, 1);
38 ok_int(nFit, 4);
39 ok_err(0);
40
41 result = GetTextExtentExPointA(GetDC(0), "test", 4, -2, &nFit, NULL, &size);
42 ok_int(result, 0);
43 ok_err(87);
44
45 result = GetTextExtentExPointW(GetDC(0), L"test", 4, -10, &nFit, NULL, &size);
46 ok_int(result, 1);
47
48 result = GetTextExtentExPointA(GetDC(0), "test", 4, -10, &nFit, NULL, &size);
49 ok_int(result, 0);
50}
#define ok_err(error)
Definition: atltest.h:124
#define ok_int(expression, result)
Definition: atltest.h:134
#define NULL
Definition: types.h:112
#define SetLastError(x)
Definition: compat.h:752
unsigned int BOOL
Definition: ntddk_ex.h:94
#define printf
Definition: freeldr.h:97
GLsizeiptr size
Definition: glext.h:5919
GLuint64EXT * result
Definition: glext.h:11304
#define L(x)
Definition: ntvdm.h:50
int32_t INT
Definition: typedefs.h:58
BOOL WINAPI GetTextExtentExPointA(_In_ HDC hdc, _In_reads_(cchString) LPCSTR lpszString, _In_ int cchString, _In_ int nMaxExtent, _Out_opt_ LPINT lpnFit, _Out_writes_to_opt_(cchString, *lpnFit) LPINT lpnDx, _Out_ LPSIZE lpSize)
BOOL WINAPI GetTextExtentExPointW(_In_ HDC hdc, _In_reads_(cchString) LPCWSTR lpszString, _In_ int cchString, _In_ int nMaxExtent, _Out_opt_ LPINT lpnFit, _Out_writes_to_opt_(cchString, *lpnFit) LPINT lpnDx, _Out_ LPSIZE lpSize)
HDC WINAPI GetDC(_In_opt_ HWND)

Referenced by START_TEST().