ReactOS 0.4.15-dev-7906-g1b85a5f
CreateFont.c File Reference
#include "precomp.h"
Include dependency graph for CreateFont.c:

Go to the source code of this file.

Macros

#define INVALIDFONT   "ThisFontDoesNotExist"
 

Functions

void Test_CreateFontA ()
 
 START_TEST (CreateFont)
 

Macro Definition Documentation

◆ INVALIDFONT

#define INVALIDFONT   "ThisFontDoesNotExist"

Definition at line 10 of file CreateFont.c.

Function Documentation

◆ START_TEST()

START_TEST ( CreateFont  )

Definition at line 32 of file CreateFont.c.

33{
35}
void Test_CreateFontA()
Definition: CreateFont.c:12

◆ Test_CreateFontA()

void Test_CreateFontA ( )

Definition at line 12 of file CreateFont.c.

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}
#define INVALIDFONT
Definition: CreateFont.c:10
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
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 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)

Referenced by START_TEST().