ReactOS 0.4.16-dev-197-g92996da
display.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Font Viewer
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Display class
5 * COPYRIGHT: Copyright 2007 Timo Kreuzer <timo.kreuzer@reactos.org>
6 */
7
8#include "precomp.h"
9
10#include <stdio.h>
11#include <malloc.h>
12
13#define SPACING1 8
14#define SPACING2 5
15
16extern INT g_NumFonts;
17extern WCHAR g_FontTitle[];
18
19const WCHAR g_szFontDisplayClassName[] = L"FontDisplayClass";
21
22/* Internal data storage type */
23typedef struct
24{
26 WCHAR szTypeFaceName[LF_FULLFACESIZE];
27 WCHAR szFormat[MAX_FORMAT];
28 WCHAR szString[MAX_STRING];
29
34 int nSizes[MAX_SIZES];
35 int nHeights[MAX_SIZES];
37
38/* This is the only public function, it registers the class */
39BOOL
41{
42 WNDCLASSEXW wincl;
43
44 /* Set the fontdisplay window class structure */
45 wincl.cbSize = sizeof(WNDCLASSEX);
46 wincl.style = CS_DBLCLKS;
48 wincl.cbClsExtra = 0;
49 wincl.cbWndExtra = 0;
50 wincl.hInstance = hInstance;
51 wincl.hIcon = NULL;
54 wincl.lpszMenuName = NULL;
56 wincl.hIconSm = NULL;
57
58 /* Register the window class, and if it fails return FALSE */
59 if (!RegisterClassExW (&wincl))
60 {
61 return FALSE;
62 }
63 return TRUE;
64}
65
66static int
68{
69 HFONT hOldFont;
71 int i, y;
72 WCHAR szSize[5];
73 WCHAR szCaption[LF_FULLFACESIZE + 20];
74
75 /* This is the location on the DC where we draw */
76 y = -nYPos;
77
78 hOldFont = SelectObject(hDC, pData->hCaptionFont);
80
81 swprintf(szCaption, L"%s%s", pData->szTypeFaceName, pData->szFormat);
82 TextOutW(hDC, 0, y, szCaption, (INT)wcslen(szCaption));
83 y += tm.tmHeight + SPACING1;
84
85 /* Draw a separation Line */
87 MoveToEx(hDC, 0, y, NULL);
88 LineTo(hDC, 10000, y);
89 y += SPACING2;
90
91 /* TODO: Output font info */
92
93 /* Output Character set */
94 SelectObject(hDC, pData->hCharSetFont);
96 swprintf(szCaption, L"abcdefghijklmnopqrstuvwxyz");
97 TextOutW(hDC, 0, y, szCaption, (INT)wcslen(szCaption));
98 y += tm.tmHeight + 1;
99
100 swprintf(szCaption, L"ABCDEFGHIJKLMNOPQRSTUVWXYZ");
101 TextOutW(hDC, 0, y, szCaption, (INT)wcslen(szCaption));
102 y += tm.tmHeight + 1;
103
104 swprintf(szCaption, L"0123456789.:,;(\"~!@#$%%^&*')");
105 TextOutW(hDC, 0, y, szCaption, (INT)wcslen(szCaption));
106 y += tm.tmHeight + 1;
107
108 /* Draw a separation Line */
110 MoveToEx(hDC, 0, y, NULL);
111 LineTo(hDC, 10000, y);
112 y += SPACING2;
113
114 /* Output the strings for different sizes */
115 for (i = 0; i < MAX_SIZES; i++)
116 {
117 SelectObject(hDC, pData->hFonts[i]);
118 TextOutW(hDC, 20, y, pData->szString, (INT)wcslen(pData->szString));
120 y += tm.tmHeight + 1;
121 SelectObject(hDC, pData->hSizeFont);
122 swprintf(szSize, L"%d", pData->nSizes[i]);
123 TextOutW(hDC, 0, y - 13 - tm.tmDescent, szSize, (INT)wcslen(szSize));
124 }
125 SelectObject(hDC, hOldFont);
126
127 return y;
128}
129
130static int
133 const LOGFONTW *lpelfe,
134 const TEXTMETRICW *lptm,
135 DWORD FontType,
137{
139 PBOOL pfOpenType = (PBOOL)lParam;
140
141 if (FontType & TRUETYPE_FONTTYPE)
142 {
144 {
145 *pfOpenType = TRUE;
146 return FALSE;
147 }
148 }
149 return TRUE;
150}
151
152static LRESULT
154{
157 HDC hDC;
158 RECT rect;
159 SCROLLINFO si;
160 int i;
161 LOGFONTW logfont;
162 BOOL fOpenType;
163 BYTE Buffer[512];
165 LPWSTR pch;
166
167 /* Set the new type face name */
169 lstrcpynW(pData->szTypeFaceName, pLogFont->lfFaceName,
170 ARRAYSIZE(pData->szTypeFaceName));
171
172 /* Create the new fonts */
173 hDC = GetDC(hwnd);
174 DeleteObject(pData->hCharSetFont);
175
176 logfont = *pLogFont;
177 logfont.lfHeight = -MulDiv(16, GetDeviceCaps(GetDC(NULL), LOGPIXELSY), 72);
178 pData->hCharSetFont = CreateFontIndirectW(&logfont);
179
180 /* Get font format */
181 SelectObject(hDC, pData->hCharSetFont);
183 if (tm.tmPitchAndFamily & TMPF_TRUETYPE)
184 {
185 if (GetOutlineTextMetricsW(hDC, sizeof(Buffer), pOTM))
186 {
187 LPBYTE pb = Buffer;
188 pb += (WORD)(DWORD_PTR)pOTM->otmpStyleName;
189 pch = (LPWSTR)pb;
190 if (*pch)
191 {
192 lstrcatW(pData->szTypeFaceName, L" ");
193 lstrcatW(pData->szTypeFaceName, pch);
194 }
195 }
196
197 fOpenType = FALSE;
198 EnumFontFamiliesExW(hDC, &logfont,
199 EnumFontFamProcW, (LPARAM)&fOpenType, 0);
200
201 if (fOpenType)
202 swprintf(pData->szFormat, L" (OpenType)");
203 else
204 swprintf(pData->szFormat, L" (TrueType)");
205 }
206 else if (tm.tmPitchAndFamily & TMPF_VECTOR)
207 {
208 swprintf(pData->szFormat, L" (Vector)");
209 }
210 else
211 {
212 swprintf(pData->szFormat, L" (Raster)");
213 }
214
215 for (i = 0; i < MAX_SIZES; i++)
216 {
217 DeleteObject(pData->hFonts[i]);
218 logfont.lfHeight = -MulDiv(pData->nSizes[i], GetDeviceCaps(hDC, LOGPIXELSY), 72);
219 pData->hFonts[i] = CreateFontIndirectW(&logfont);
220 }
221
222 /* Calculate new page dimensions */
223 pData->nPageHeight = Display_DrawText(hDC, pData, 0);
225
226 /* Set the vertical scrolling range and page size */
228 si.cbSize = sizeof(si);
230 si.nMin = 0;
231 si.nMax = pData->nPageHeight;
232 si.nPage = rect.bottom;
233 si.nPos = 0;
234 si.nTrackPos = 0;
236
237 return 0;
238}
239
240static LRESULT
242{
244
246 lstrcpynW(pData->szString, pszString, ARRAYSIZE(pData->szString));
247
249
250 return 0;
251}
252
253static LRESULT
255{
257 const int nSizes[MAX_SIZES] = {8, 12, 18, 24, 36, 48, 60, 72};
258 int i;
259 LOGFONTW LogFont = {50, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE,
262 DEFAULT_PITCH , L"MS Shell Dlg"};
263
264 /* Create data structure */
265 pData = malloc(sizeof(DISPLAYDATA));
266 ZeroMemory(pData, sizeof(DISPLAYDATA));
267
268 /* Set the window's GWLP_USERDATA to our data structure */
270
271 for (i = 0; i < MAX_SIZES; i++)
272 {
273 pData->nSizes[i] = nSizes[i];
274 }
275
276 pData->hCaptionFont = CreateFontIndirectW(&LogFont);
277 LogFont.lfHeight = 12;
278 pData->hSizeFont = CreateFontIndirectW(&LogFont);
279
281 L"Jackdaws love my big sphinx of quartz. 1234567890");
282
283 Display_SetTypeFace(hwnd, &LogFont);
284
285 return 0;
286}
287
288static LRESULT
290{
292 PAINTSTRUCT ps;
293 SCROLLINFO si;
294
296
297 /* Get the Scroll position */
298 si.cbSize = sizeof(si);
299 si.fMask = SIF_POS;
301
302 BeginPaint(hwnd, &ps);
303
304 /* Erase background */
306
307 /* Draw the text */
309
310 EndPaint(hwnd, &ps);
311
312 return 0;
313}
314
315static LRESULT
317{
318 RECT rect;
319 SCROLLINFO si;
320 int nOldPos;
321
323
324 /* Get the old scroll pos */
325 si.cbSize = sizeof(si);
326 si.fMask = SIF_POS;
328 nOldPos = si.nPos;
329
330 /* Set the new page size */
331 si.fMask = SIF_PAGE;
332 si.nPage = rect.bottom;
334
335 /* Get the new scroll pos */
336 si.fMask = SIF_POS;
338
339 /* If they don't match ... */
340 if (nOldPos != si.nPos)
341 {
342 /* ... scroll the window */
343 ScrollWindowEx(hwnd, 0, nOldPos - si.nPos, NULL, NULL, NULL, NULL, SW_INVALIDATE);
345 }
346
347 return 0;
348}
349
350static LRESULT
352{
353 SCROLLINFO si;
354 int nPos;
355
356 si.cbSize = sizeof(si);
359
360 switch(LOWORD(wParam))
361 {
362 case SB_PAGEUP:
363 nPos = si.nPos - 50;
364 break;
365 case SB_PAGEDOWN:
366 nPos = si.nPos + 50;
367 break;
368 case SB_LINEUP:
369 nPos = si.nPos - 10;
370 break;
371 case SB_LINEDOWN:
372 nPos = si.nPos + 10;
373 break;
374 case SB_THUMBTRACK:
375 case SB_THUMBPOSITION:
376 nPos = si.nTrackPos;
377 break;
378 default:
379 nPos = si.nPos;
380 }
381
382 nPos = max(nPos, si.nMin);
383 nPos = min(nPos, si.nMax);
384 if (nPos != si.nPos)
385 {
387 si.cbSize = sizeof(si);
388 si.nPos = nPos;
389 si.fMask = SIF_POS;
392 }
393
394 return 0;
395}
396
397static LRESULT
399{
401 int i;
402
404
405 /* Delete the fonts */
406 DeleteObject(pData->hCaptionFont);
407 DeleteObject(pData->hCharSetFont);
408 DeleteObject(pData->hSizeFont);
409
410 for (i = 0; i < MAX_SIZES; i++)
411 {
412 DeleteObject(pData->hFonts[i]);
413 }
414
415 /* Free the data structure */
416 free(pData);
417
418 return 0;
419}
420
423{
424 PRINTDLG pfont;
426 int copies, yPos;
427
428 /* Clears the memory before using it */
429 ZeroMemory(&pfont, sizeof(pfont));
430
431 pfont.lStructSize = sizeof(pfont);
432 pfont.hwndOwner = hwnd;
433 pfont.hDevMode = NULL;
434 pfont.hDevNames = NULL;
436 pfont.nCopies = 1;
437 pfont.nFromPage = 0xFFFF;
438 pfont.nToPage = 0xFFFF;
439 pfont.nMinPage = 1;
440 pfont.nMaxPage = 0xFFFF;
441
442 /* Opens up the print dialog box */
443 if (PrintDlg(&pfont))
444 {
445 DOCINFO docinfo;
446#if 0
448
449 pData = malloc(sizeof(DISPLAYDATA));
450 ZeroMemory(pData, sizeof(DISPLAYDATA));
451
452 /* Sets up the font layout */
454#endif
455 docinfo.cbSize = sizeof(DOCINFO);
456 docinfo.lpszDocName = L"Printing Font";
457 docinfo.lpszOutput = NULL;
458 docinfo.lpszDatatype = NULL;
459 docinfo.fwType = 0;
460
461 /* We start printing */
462 StartDoc(pfont.hDC, &docinfo);
463
464 /* Grabs the text metrics for the printer */
465 GetTextMetrics(pfont.hDC, &tm);
466
467 /* Start out with 0 for the y position for the page */
468 yPos = 0;
469
470 /* Starts out with the current page */
471 StartPage(pfont.hDC);
472
473 /* Used when printing for more than one copy */
474 for (copies = 0; copies < pfont.nCopies; copies++)
475 {
476 /* Test output */
477 TextOutW(pfont.hDC, 10, yPos, L"Testing...1...2...3", 19);
478
479 /* TODO: Determine if using Display_DrawText() will work for both rendering out to the
480 window and to the printer output */
481#if 0
482 Display_DrawText(pfont.hDC, pData, yPos);
483#endif
484
485 /* Ends the current page */
486 EndPage(pfont.hDC);
487
488 /* If we are making more than one copy, start a new page */
489 if (copies != pfont.nCopies)
490 {
491 yPos = 0;
492 StartPage(pfont.hDC);
493 }
494 }
495
496 /* The printing is now over */
497 EndDoc(pfont.hDC);
498
499 DeleteDC(pfont.hDC);
500#if 0
501 /* Frees the memory since we no longer need it for now */
502 free(pData);
503#endif
504 }
505
506 return 0;
507}
508
511{
513 INT len;
514
516
517 len = wcslen(pData->szTypeFaceName) + wcslen(pData->szFormat) + 2;
518
519 if (ptr != NULL && length >= len)
520 {
521 swprintf(ptr, L"%s%s", pData->szTypeFaceName, pData->szFormat);
522 }
523
524 return (LRESULT)len;
525}
526
529{
530 switch (message)
531 {
532 case WM_CREATE:
533 return Display_OnCreate(hwnd);
534
535 case WM_PAINT:
536 return Display_OnPaint(hwnd);
537
538 case WM_SIZE:
539 return Display_OnSize(hwnd);
540
541 case WM_VSCROLL:
543
544 case FVM_SETTYPEFACE:
546
547 case FVM_SETSTRING:
549
550 case FVM_GETFULLNAME:
552
553 case WM_DESTROY:
554 return Display_OnDestroy(hwnd);
555
556 default:
558 }
559
560 return 0;
561}
static HDC hDC
Definition: 3dtext.c:33
static LRESULT Display_OnDestroy(HWND hwnd)
Definition: display.c:398
const WCHAR g_szFontDisplayClassName[]
Definition: display.c:19
LRESULT Display_GetFullName(HWND hwnd, INT length, PWSTR ptr)
Definition: display.c:510
INT g_NumFonts
Definition: fontview.c:21
LRESULT Display_OnPrint(HWND hwnd)
Definition: display.c:422
static LRESULT Display_OnVScroll(HWND hwnd, WPARAM wParam)
Definition: display.c:351
static LRESULT Display_OnPaint(HWND hwnd)
Definition: display.c:289
static int CALLBACK EnumFontFamProcW(const LOGFONTW *lpelfe, const TEXTMETRICW *lptm, DWORD FontType, LPARAM lParam)
Definition: display.c:132
LRESULT CALLBACK DisplayProc(HWND, UINT, WPARAM, LPARAM)
Definition: display.c:528
static LRESULT Display_SetString(HWND hwnd, LPCWSTR pszString)
Definition: display.c:241
#define SPACING1
Definition: display.c:13
WCHAR g_FontTitle[]
Definition: fontview.c:24
static LRESULT Display_OnCreate(HWND hwnd)
Definition: display.c:254
BOOL Display_InitClass(HINSTANCE hInstance)
Definition: display.c:40
static int Display_DrawText(HDC hDC, DISPLAYDATA *pData, int nYPos)
Definition: display.c:67
static LRESULT Display_SetTypeFace(HWND hwnd, PLOGFONTW pLogFont)
Definition: display.c:153
#define SPACING2
Definition: display.c:14
static LRESULT Display_OnSize(HWND hwnd)
Definition: display.c:316
#define FVM_SETSTRING
Definition: display.h:5
#define FVM_GETFULLNAME
Definition: display.h:6
#define FVM_SETTYPEFACE
Definition: display.h:4
#define MAX_FORMAT
Definition: display.h:10
#define MAX_SIZES
Definition: display.h:11
HINSTANCE hInstance
Definition: charmap.c:19
Definition: bufpool.h:45
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define PD_USEDEVMODECOPIESANDCOLLATE
Definition: commdlg.h:166
#define PrintDlg
Definition: commdlg.h:668
#define PD_RETURNDC
Definition: commdlg.h:155
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
#define CALLBACK
Definition: compat.h:35
#define lstrcpynW
Definition: compat.h:738
#define swprintf
Definition: precomp.h:40
#define MAX_STRING
Definition: doskey.c:43
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
pKey DeleteObject()
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLenum GLsizei len
Definition: glext.h:6722
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
#define pch(ap)
Definition: match.c:418
static PVOID ptr
Definition: dispmode.c:27
static HDC
Definition: imagelist.c:88
static LPTEXTMETRICW lptm
Definition: font.c:42
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
#define min(a, b)
Definition: monoChain.cc:55
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
unsigned int UINT
Definition: ndis.h:50
#define L(x)
Definition: ntvdm.h:50
#define LOWORD(l)
Definition: pedump.c:82
& rect
Definition: startmenu.cpp:1413
int nPageHeight
Definition: display.c:25
HFONT hCaptionFont
Definition: display.c:30
HFONT hCharSetFont
Definition: display.c:31
HFONT hSizeFont
Definition: display.c:32
LONG lfHeight
Definition: dimm.idl:59
int cbSize
Definition: wingdi.h:1676
LPCSTR lpszOutput
Definition: wingdi.h:1678
LPCSTR lpszDatatype
Definition: wingdi.h:1679
LPCSTR lpszDocName
Definition: wingdi.h:1677
DWORD fwType
Definition: wingdi.h:1680
LPCWSTR lpszClassName
Definition: winuser.h:3229
LPCWSTR lpszMenuName
Definition: winuser.h:3228
HBRUSH hbrBackground
Definition: winuser.h:3227
WNDPROC lpfnWndProc
Definition: winuser.h:3221
UINT cbSize
Definition: winuser.h:3219
int cbWndExtra
Definition: winuser.h:3223
HCURSOR hCursor
Definition: winuser.h:3226
HICON hIconSm
Definition: winuser.h:3230
HINSTANCE hInstance
Definition: winuser.h:3224
UINT style
Definition: winuser.h:3220
int cbClsExtra
Definition: winuser.h:3222
HICON hIcon
Definition: winuser.h:3225
Definition: tftpd.h:60
WCHAR lfFaceName[LF_FACESIZE]
Definition: wingdi.h:1910
WORD nMaxPage
Definition: commdlg.h:474
HDC hDC
Definition: commdlg.h:469
DWORD Flags
Definition: commdlg.h:470
WORD nCopies
Definition: commdlg.h:475
WORD nFromPage
Definition: commdlg.h:471
HGLOBAL hDevMode
Definition: commdlg.h:467
WORD nToPage
Definition: commdlg.h:472
WORD nMinPage
Definition: commdlg.h:473
HGLOBAL hDevNames
Definition: commdlg.h:468
HWND hwndOwner
Definition: commdlg.h:466
DWORD lStructSize
Definition: commdlg.h:465
Definition: time.h:68
#define max(a, b)
Definition: svc.c:63
#define GetWindowLongPtr
Definition: treelist.c:73
#define SetWindowLongPtr
Definition: treelist.c:70
#define GWLP_USERDATA
Definition: treelist.c:63
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
uint16_t * PWSTR
Definition: typedefs.h:56
uint32_t DWORD_PTR
Definition: typedefs.h:65
unsigned char * LPBYTE
Definition: typedefs.h:53
int32_t INT
Definition: typedefs.h:58
#define ZeroMemory
Definition: winbase.h:1736
_In_ DWORD _In_ DWORD _Out_writes_to_opt_ pcchString LPSTR pszString
Definition: wincrypt.h:4505
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
BOOL * PBOOL
Definition: windef.h:161
#define DEFAULT_PITCH
Definition: wingdi.h:443
struct _OUTLINETEXTMETRICW * LPOUTLINETEXTMETRICW
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI EndPage(_In_ HDC)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
int WINAPI EnumFontFamiliesExW(_In_ HDC, _In_ PLOGFONTW, _In_ FONTENUMPROCW, _In_ LPARAM, _In_ DWORD)
#define TRUETYPE_FONTTYPE
Definition: wingdi.h:1109
#define LOGPIXELSY
Definition: wingdi.h:719
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1546
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
int WINAPI EndDoc(_In_ HDC)
#define TMPF_TRUETYPE
Definition: wingdi.h:1313
#define WHITE_BRUSH
Definition: wingdi.h:902
#define TMPF_VECTOR
Definition: wingdi.h:1312
#define OUT_DEFAULT_PRECIS
Definition: wingdi.h:415
#define BLACK_PEN
Definition: wingdi.h:903
int WINAPI StartPage(_In_ HDC)
#define ANSI_CHARSET
Definition: wingdi.h:383
#define PROOF_QUALITY
Definition: wingdi.h:438
DOCINFOA DOCINFO
Definition: wingdi.h:4414
#define CLIP_DEFAULT_PRECIS
Definition: wingdi.h:426
UINT WINAPI GetOutlineTextMetricsW(_In_ HDC hdc, _In_ UINT cjCopy, _Out_writes_bytes_opt_(cjCopy) LPOUTLINETEXTMETRICW potm)
#define NTM_TT_OPENTYPE
Definition: wingdi.h:27
#define FW_NORMAL
Definition: wingdi.h:373
struct tagNEWTEXTMETRICW * PNEWTEXTMETRICW
#define NTM_PS_OPENTYPE
Definition: wingdi.h:26
BOOL WINAPI TextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_reads_(c) LPCWSTR lpString, _In_ int c)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
BOOL WINAPI DeleteDC(_In_ HDC)
#define GetTextMetrics
Definition: wingdi.h:4474
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
#define LF_FULLFACESIZE
Definition: wingdi.h:41
#define StartDoc
Definition: wingdi.h:4482
#define WM_PAINT
Definition: winuser.h:1623
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define SB_THUMBTRACK
Definition: winuser.h:573
#define SB_LINEUP
Definition: winuser.h:564
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_VSCROLL
Definition: winuser.h:1747
#define SIF_RANGE
Definition: winuser.h:1238
#define WM_CREATE
Definition: winuser.h:1611
#define WM_SIZE
Definition: winuser.h:1614
#define SB_VERT
Definition: winuser.h:553
#define SW_INVALIDATE
Definition: winuser.h:2582
#define IDC_ARROW
Definition: winuser.h:687
#define SIF_PAGE
Definition: winuser.h:1236
#define CS_DBLCLKS
Definition: winuser.h:651
#define SIF_TRACKPOS
Definition: winuser.h:1240
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI UpdateWindow(_In_ HWND)
#define SB_PAGEDOWN
Definition: winuser.h:569
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
#define LoadCursor
Definition: winuser.h:5824
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5731
HDC WINAPI GetDC(_In_opt_ HWND)
#define SB_LINEDOWN
Definition: winuser.h:565
#define SIF_POS
Definition: winuser.h:1237
int WINAPI SetScrollInfo(_In_ HWND, _In_ int, _In_ LPCSCROLLINFO, _In_ BOOL)
#define WM_DESTROY
Definition: winuser.h:1612
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI GetScrollInfo(_In_ HWND, _In_ int, _Inout_ LPSCROLLINFO)
int WINAPI ScrollWindowEx(_In_ HWND, _In_ int, _In_ int, _In_opt_ LPCRECT, _In_opt_ LPCRECT, _In_opt_ HRGN, _Out_opt_ LPRECT, _In_ UINT)
#define SB_PAGEUP
Definition: winuser.h:568
#define SB_THUMBPOSITION
Definition: winuser.h:572
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193