51 DWORD info_size, num_printers=0;
90 int expected_pointsize, expected_lfheight;
106 expected_pointsize =
MulDiv(16, 72, dpiy) * 10;
107 expected_lfheight = -
MulDiv(expected_pointsize, dpiy, 720);
109 ok(
ret ==
TRUE,
"ChooseFontA returned FALSE\n");
111 ok(lfa.
lfHeight == expected_lfheight,
"Expected %i, got %i\n", expected_lfheight, lfa.
lfHeight);
117 skip(
"can't get a DC for a local printer\n");
129 cfa.
hDC = printer_ic;
134 expected_pointsize =
MulDiv(16, 72, dpiy) * 10;
135 expected_lfheight = -
MulDiv(expected_pointsize, dpiy, 720);
137 ok(
ret ==
TRUE,
"ChooseFontA returned FALSE\n");
139 ok(lfa.
lfHeight == expected_lfheight,
"Expected %i, got %i\n", expected_lfheight, lfa.
lfHeight);
int strcmp(const char *String1, const char *String2)
char * strcpy(char *DstString, const char *SrcString)
#define CF_INITTOLOGFONTSTRUCT
BOOL WINAPI ChooseFontA(LPCHOOSEFONTA lpChFont)
#define HeapFree(x, y, z)
static void test_ChooseFontA(void)
static int get_dpiy(void)
static HDC get_printer_ic(void)
static UINT_PTR CALLBACK CFHookProcOK(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam)
unsigned __int3264 UINT_PTR
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
CHAR lfFaceName[LF_FACESIZE]
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
HDC WINAPI CreateICA(_In_opt_ LPCSTR, _In_opt_ LPCSTR, _In_opt_ LPCSTR, _In_opt_ const DEVMODEA *)
BOOL WINAPI DeleteDC(_In_ HDC)
#define PRINTER_ENUM_LOCAL
WINBOOL WINAPI EnumPrintersA(DWORD Flags, LPSTR Name, DWORD Level, LPBYTE pPrinterEnum, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)