#include "precomp.h"
#include <stdio.h>
#include <malloc.h>
Go to the source code of this file.
|
LRESULT CALLBACK | DisplayProc (HWND, UINT, WPARAM, LPARAM) |
|
BOOL | Display_InitClass (HINSTANCE hInstance) |
|
static int | Display_DrawText (HDC hDC, DISPLAYDATA *pData, int nYPos) |
|
static int CALLBACK | EnumFontFamProcW (const LOGFONTW *lpelfe, const TEXTMETRICW *lptm, DWORD FontType, LPARAM lParam) |
|
static LRESULT | Display_SetTypeFace (HWND hwnd, PLOGFONTW pLogFont) |
|
static LRESULT | Display_SetString (HWND hwnd, LPCWSTR pszString) |
|
static LRESULT | Display_OnCreate (HWND hwnd) |
|
static LRESULT | Display_OnPaint (HWND hwnd) |
|
static LRESULT | Display_OnSize (HWND hwnd) |
|
static LRESULT | Display_OnVScroll (HWND hwnd, WPARAM wParam) |
|
static LRESULT | Display_OnDestroy (HWND hwnd) |
|
LRESULT | Display_OnPrint (HWND hwnd) |
|
LRESULT | Display_GetFullName (HWND hwnd, INT length, PWSTR ptr) |
|
◆ SPACING1
◆ SPACING2
◆ Display_DrawText()
Definition at line 67 of file display.c.
68{
74
75
77
80
84
85
90
91
92
93
96 swprintf(szCaption,
L"abcdefghijklmnopqrstuvwxyz");
99
100 swprintf(szCaption,
L"ABCDEFGHIJKLMNOPQRSTUVWXYZ");
102 y +=
tm.tmHeight + 1;
103
104 swprintf(szCaption,
L"0123456789.:,;(\"~!@#$%%^&*')");
106 y +=
tm.tmHeight + 1;
107
108
113
114
116 {
120 y +=
tm.tmHeight + 1;
124 }
126
128}
GLint GLint GLint GLint GLint GLint y
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
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
HGDIOBJ WINAPI GetStockObject(_In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
BOOL WINAPI TextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_reads_(c) LPCWSTR lpString, _In_ int c)
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
Referenced by Display_OnPaint(), Display_OnPrint(), and Display_SetTypeFace().
◆ Display_GetFullName()
Definition at line 510 of file display.c.
511{
514
516
518
520 {
522 }
523
525}
GLuint GLsizei GLsizei * length
Referenced by DisplayProc().
◆ Display_InitClass()
Definition at line 40 of file display.c.
41{
43
44
57
58
60 {
62 }
64}
const WCHAR g_szFontDisplayClassName[]
LRESULT CALLBACK DisplayProc(HWND, UINT, WPARAM, LPARAM)
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
Referenced by wWinMain().
◆ Display_OnCreate()
Definition at line 254 of file display.c.
255{
257 const int nSizes[
MAX_SIZES] = {8, 12, 18, 24, 36, 48, 60, 72};
263
264
267
268
270
272 {
274 }
275
279
281 L"Jackdaws love my big sphinx of quartz. 1234567890");
282
284
285 return 0;
286}
static LRESULT Display_SetString(HWND hwnd, LPCWSTR pszString)
static LRESULT Display_SetTypeFace(HWND hwnd, PLOGFONTW pLogFont)
#define OUT_DEFAULT_PRECIS
#define CLIP_DEFAULT_PRECIS
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
Referenced by DisplayProc().
◆ Display_OnDestroy()
Definition at line 398 of file display.c.
399{
402
404
405
409
411 {
413 }
414
415
417
418 return 0;
419}
Referenced by DisplayProc().
◆ Display_OnPaint()
Definition at line 289 of file display.c.
290{
294
296
297
301
303
304
306
307
309
311
312 return 0;
313}
static int Display_DrawText(HDC hDC, DISPLAYDATA *pData, int nYPos)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI GetScrollInfo(_In_ HWND, _In_ int, _Inout_ LPSCROLLINFO)
Referenced by DisplayProc().
◆ Display_OnPrint()
Definition at line 422 of file display.c.
423{
426 int copies, yPos;
427
428
430
441
442
444 {
446#if 0
448
451
452
454#endif
460
461
463
464
466
467
468 yPos = 0;
469
470
472
473
474 for (copies = 0; copies < pfont.
nCopies; copies++)
475 {
476
477 TextOutW(pfont.
hDC, 10, yPos,
L"Testing...1...2...3", 19);
478
479
480
481#if 0
483#endif
484
485
487
488
490 {
491 yPos = 0;
493 }
494 }
495
496
498
500#if 0
501
503#endif
504 }
505
506 return 0;
507}
#define PD_USEDEVMODECOPIESANDCOLLATE
int WINAPI EndPage(_In_ HDC)
int WINAPI EndDoc(_In_ HDC)
int WINAPI StartPage(_In_ HDC)
BOOL WINAPI DeleteDC(_In_ HDC)
Referenced by MainWndProc().
◆ Display_OnSize()
Definition at line 316 of file display.c.
317{
320 int nOldPos;
321
323
324
329
330
334
335
338
339
340 if (nOldPos != si.
nPos)
341 {
342
345 }
346
347 return 0;
348}
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI UpdateWindow(_In_ HWND)
int WINAPI SetScrollInfo(_In_ HWND, _In_ int, _In_ LPCSCROLLINFO, _In_ BOOL)
int WINAPI ScrollWindowEx(_In_ HWND, _In_ int, _In_ int, _In_opt_ LPCRECT, _In_opt_ LPCRECT, _In_opt_ HRGN, _Out_opt_ LPRECT, _In_ UINT)
Referenced by DisplayProc().
◆ Display_OnVScroll()
Definition at line 351 of file display.c.
352{
354 int nPos;
355
359
361 {
364 break;
367 break;
370 break;
373 break;
377 break;
378 default:
380 }
381
385 {
392 }
393
394 return 0;
395}
Referenced by DisplayProc().
◆ Display_SetString()
Definition at line 241 of file display.c.
242{
244
247
249
250 return 0;
251}
_In_ DWORD _In_ DWORD _Out_writes_to_opt_ pcchString LPSTR pszString
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
Referenced by Display_OnCreate(), and DisplayProc().
◆ Display_SetTypeFace()
Definition at line 153 of file display.c.
154{
166
167
171
172
175
176 logfont = *pLogFont;
179
180
184 {
186 {
191 {
194 }
195 }
196
200
201 if (fOpenType)
203 else
205 }
207 {
209 }
210 else
211 {
213 }
214
216 {
220 }
221
222
225
226
236
237 return 0;
238}
static int CALLBACK EnumFontFamProcW(const LOGFONTW *lpelfe, const TEXTMETRICW *lptm, DWORD FontType, LPARAM lParam)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
WCHAR lfFaceName[LF_FACESIZE]
struct _OUTLINETEXTMETRICW * LPOUTLINETEXTMETRICW
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
int WINAPI EnumFontFamiliesExW(_In_ HDC, _In_ PLOGFONTW, _In_ FONTENUMPROCW, _In_ LPARAM, _In_ DWORD)
UINT WINAPI GetOutlineTextMetricsW(_In_ HDC hdc, _In_ UINT cjCopy, _Out_writes_bytes_opt_(cjCopy) LPOUTLINETEXTMETRICW potm)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDC(_In_opt_ HWND)
Referenced by Display_OnCreate(), and DisplayProc().
◆ DisplayProc()
Definition at line 528 of file display.c.
529{
531 {
534
537
540
543
546
549
552
555
556 default:
558 }
559
560 return 0;
561}
static LRESULT Display_OnDestroy(HWND hwnd)
LRESULT Display_GetFullName(HWND hwnd, INT length, PWSTR ptr)
static LRESULT Display_OnVScroll(HWND hwnd, WPARAM wParam)
static LRESULT Display_OnPaint(HWND hwnd)
static LRESULT Display_OnCreate(HWND hwnd)
static LRESULT Display_OnSize(HWND hwnd)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
Referenced by Display_InitClass().
◆ EnumFontFamProcW()
Definition at line 132 of file display.c.
137{
140
142 {
144 {
147 }
148 }
150}
static LPTEXTMETRICW lptm
#define TRUETYPE_FONTTYPE
struct tagNEWTEXTMETRICW * PNEWTEXTMETRICW
Referenced by Display_SetTypeFace().
◆ g_FontTitle
◆ g_NumFonts
◆ g_szFontDisplayClassName
const WCHAR g_szFontDisplayClassName[] = L"FontDisplayClass" |