ReactOS 0.4.16-dev-237-gd6eebaa
CreateFont.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 CreateFont
5 * PROGRAMMERS: Timo Kreuzer
6 */
7
8#include "precomp.h"
9
10#define INVALIDFONT "ThisFontDoesNotExist"
11
13{
15 LOGFONTA logfonta;
16 INT result;
17
18 /* Test invalid font name */
19 hFont = CreateFontA(15, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE,
22 ok(hFont != 0, "CreateFontA failed\n");
23
24 result = GetObjectA(hFont, sizeof(LOGFONTA), &logfonta);
25 ok(result == sizeof(LOGFONTA), "result = %d", result);
26
27 ok(memcmp(logfonta.lfFaceName, INVALIDFONT, strlen(INVALIDFONT)) == 0, "not equal\n");
28 ok(logfonta.lfWeight == FW_DONTCARE, "lfWeight=%ld\n", logfonta.lfWeight);
29
30}
31
33{
35}
36
#define INVALIDFONT
Definition: CreateFont.c:10
void Test_CreateFontA()
Definition: CreateFont.c:12
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define ok(value,...)
Definition: atltest.h:57
#define START_TEST(x)
Definition: atltest.h:75
HFONT hFont
Definition: main.c:53
#define FALSE
Definition: types.h:117
GLuint64EXT * result
Definition: glext.h:11304
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
LONG lfWeight
Definition: dimm.idl:46
CHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:55
int32_t INT
Definition: typedefs.h:58
#define DEFAULT_PITCH
Definition: wingdi.h:443
#define FW_DONTCARE
Definition: wingdi.h:368
int WINAPI GetObjectA(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
#define DEFAULT_QUALITY
Definition: wingdi.h:436
#define DEFAULT_CHARSET
Definition: wingdi.h:384
#define OUT_DEFAULT_PRECIS
Definition: wingdi.h:415
#define CreateFont
Definition: wingdi.h:4443
#define CLIP_DEFAULT_PRECIS
Definition: wingdi.h:426
HFONT WINAPI CreateFontA(_In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_opt_ LPCSTR)