ReactOS 0.4.17-dev-966-gf06eace
fontdlg.c
Go to the documentation of this file.
1/*
2 * COMMDLG - Font Dialog
3 *
4 * Copyright 1994 Martin Ayotte
5 * Copyright 1996 Albrecht Kleine
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22#include <ctype.h>
23#include <stdlib.h>
24#include <stdarg.h>
25#include <stdio.h>
26#include <string.h>
27#include "windef.h"
28#include "winbase.h"
29#include "winnls.h"
30#include "wingdi.h"
31#include "winuser.h"
32#include "commdlg.h"
33#include "dlgs.h"
34#include "wine/debug.h"
35#include "wine/heap.h"
36#include "cderr.h"
37#include "cdlg.h"
38
40
41typedef struct
42{
46 int added;
48
49
50static const WCHAR strWineFontData[] = L"__WINE_FONTDLGDATA";
51static const WCHAR strWineFontData_a[] = L"__WINE_FONTDLGDATA_A";
52
53/* image list with TrueType bitmaps and more */
54static HIMAGELIST himlTT = 0;
55#define TTBITMAP_XSIZE 20 /* x-size of the bitmaps */
56
59
60/* There is a table here of all charsets, and the sample text for each.
61 * There is a second table that translates a charset into an index into
62 * the first table.
63 */
64
65#define CI(cs) ((IDS_CHARSET_##cs)-IDS_CHARSET_ANSI)
66
67static const WCHAR * const sample_lang_text[]={
68 L"AaBbYyZz", /* Western and default */
69 L"Symbol", /* Symbol */
70 L"Aa\x3042\x3041\x30a2\x30a1\x4e9c\x5b87", /* Shift JIS */
71 L"\xac00\xb098\xb2e4" "AaBYyZz", /* Hangul */
72 L"\x5fae\x8f6f\x4e2d\x6587\x8f6f\x4ef6", /* GB2312 */
73 L"\x4e2d\x6587\x5b57\x578b\x7bc4\x4f8b", /* BIG5 */
74 L"AaBb\x0391\x03b1\x0392\x03b2", /* Greek */
75 L"AaBb\x011e\x011f\x015e\x015f", /* Turkish */
76 L"AaBb\x05e0\x05e1\x05e9\x05ea", /* Hebrew */
77 L"AaBb\x0627\x0628\x062c\x062f\x0647\x0648\x0632", /* Arabic */
78 L"AaBbYyZz", /* Baltic */
79 L"AaBb\x01a0\x01a1\x01af\x01b0", /* Vietnamese */
80 L"AaBb\x0411\x0431\x0424\x0444", /* Cyrillic */
81 L"AaBb\x00c1\x00e1\x00d4\x00f4", /* East European */
82 L"AaBb\x0e2d\x0e31\x0e01\x0e29\x0e23\x0e44\x0e17\x0e22", /* Thai */
83 L"\xac00\xb098\xb2e4" "AaBYyZz", /* Johab */
84 L"AaBbYyZz", /* Mac */
85 L"AaBb\x00f8\x00f1\x00fd", /* OEM */
86 /* the following character sets actually behave different (Win2K observation):
87 * the sample string is 'sticky': it uses the sample string of the previous
88 * selected character set. That behaviour looks like some default, which is
89 * not (yet) implemented. */
90 L"AaBb", /* VISCII */
91 L"AaBb", /* TCVN */
92 L"AaBb", /* KOI-8 */
93 L"AaBb", /* ISO-8859-3 */
94 L"AaBb", /* ISO-8859-4 */
95 L"AaBb", /* ISO-8859-10 */
96 L"AaBb" /* Celtic */
97};
98
99
100static const BYTE CHARSET_ORDER[256]={
101 CI(ANSI), 0, CI(SYMBOL), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
102 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
103 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
104 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
105 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CI(MAC), 0, 0,
106 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
107 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
108 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
109 CI(JIS), CI(HANGUL), CI(JOHAB), 0, 0, 0, CI(GB2312), 0, CI(BIG5), 0, 0, 0, 0, 0, 0, 0,
110 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
111 0, CI(GREEK), CI(TURKISH), CI(VIETNAMESE), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
112 0, CI(HEBREW), CI(ARABIC), 0, 0, 0, 0, 0, 0, 0, CI(BALTIC), 0, 0, 0, 0, 0,
113 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CI(RUSSIAN), 0, 0, 0,
114 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CI(THAI), 0,
115 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CI(EE), 0,
116 CI(VISCII), CI(TCVN), CI(KOI8), CI(ISO3), CI(ISO4), CI(ISO10), CI(CELTIC), 0, 0, 0, 0, 0, 0, 0, 0, CI(OEM),
117};
118
119static const struct {
121 const char *name;
122} cfflags[] = {
123#define XX(x) { x, #x },
133 XX(CF_APPLY)
149#undef XX
151
152static void _dump_cf_flags(DWORD cflags)
153{
154 unsigned int i;
155
156 for (i = 0; i < ARRAY_SIZE(cfflags); i++)
157 if (cfflags[i].mask & cflags)
158 TRACE("%s|",cfflags[i].name);
159 TRACE("\n");
160}
161
162/***********************************************************************
163 * ChooseFontW (COMDLG32.@)
164 *
165 * Create a font dialog box.
166 *
167 * PARAMS
168 * lpChFont [I/O] in: information to initialize the dialog box.
169 * out: User's color selection
170 *
171 * RETURNS
172 * TRUE: Ok button clicked.
173 * FALSE: Cancel button clicked, or error.
174 */
176{
177 LPCVOID template;
178 HRSRC hResInfo;
179 HINSTANCE hDlginst;
180 HGLOBAL hDlgTmpl;
181
182 TRACE("(%p)\n", lpChFont);
183
184 if ( (lpChFont->Flags&CF_ENABLETEMPLATEHANDLE)!=0 )
185 {
186 template=lpChFont->hInstance;
187 } else
188 {
189 if ( (lpChFont->Flags&CF_ENABLETEMPLATE)!=0 )
190 {
191 hDlginst=lpChFont->hInstance;
192 if( !(hResInfo = FindResourceW(hDlginst, lpChFont->lpTemplateName,
193 (LPWSTR)RT_DIALOG)))
194 {
196 return FALSE;
197 }
198 } else
199 {
200 hDlginst=COMDLG32_hInstance;
201 if (!(hResInfo = FindResourceW(hDlginst, L"CHOOSE_FONT", (LPWSTR)RT_DIALOG)))
202 {
204 return FALSE;
205 }
206 }
207 if (!(hDlgTmpl = LoadResource(hDlginst, hResInfo )) ||
208 !(template = LockResource( hDlgTmpl )))
209 {
211 return FALSE;
212 }
213 }
214 if (TRACE_ON(commdlg))
215 _dump_cf_flags(lpChFont->Flags);
216
217 if (lpChFont->Flags & CF_SELECTSCRIPT)
218 FIXME(": unimplemented flag (ignored)\n");
219
221 lpChFont->hwndOwner, FormatCharDlgProcW, (LPARAM)lpChFont );
222}
223
224/***********************************************************************
225 * ChooseFontA (COMDLG32.@)
226 *
227 * See ChooseFontW.
228 */
230{
231 LPCVOID template;
232 HRSRC hResInfo;
233 HINSTANCE hDlginst;
234 HGLOBAL hDlgTmpl;
235
236 TRACE("(%p)\n", lpChFont);
237
238 if ( (lpChFont->Flags&CF_ENABLETEMPLATEHANDLE)!=0 )
239 {
240 template=lpChFont->hInstance;
241 } else
242 {
243 if ( (lpChFont->Flags&CF_ENABLETEMPLATE)!=0 )
244 {
245 hDlginst=lpChFont->hInstance;
246 if( !(hResInfo = FindResourceA(hDlginst, lpChFont->lpTemplateName,
247 (LPSTR)RT_DIALOG)))
248 {
250 return FALSE;
251 }
252 } else
253 {
254 hDlginst=COMDLG32_hInstance;
255 if (!(hResInfo = FindResourceW(hDlginst, L"CHOOSE_FONT", (LPWSTR)RT_DIALOG)))
256 {
258 return FALSE;
259 }
260 }
261 if (!(hDlgTmpl = LoadResource(hDlginst, hResInfo )) ||
262 !(template = LockResource( hDlgTmpl )))
263 {
265 return FALSE;
266 }
267 }
268 if (TRACE_ON(commdlg))
269 _dump_cf_flags(lpChFont->Flags);
270 if (lpChFont->Flags & CF_SELECTSCRIPT)
271 FIXME(": unimplemented flag (ignored)\n");
272
274 lpChFont->hwndOwner, FormatCharDlgProcA, (LPARAM)lpChFont );
275}
276
277#define TEXT_EXTRAS 4
278#define TEXT_COLORS 16
279
281{
282 0x00000000L,0x00000080L,0x00008000L,0x00008080L,
283 0x00800000L,0x00800080L,0x00808000L,0x00808080L,
284 0x00c0c0c0L,0x000000ffL,0x0000ff00L,0x0000ffffL,
285 0x00ff0000L,0x00ff00ffL,0x00ffff00L,0x00FFFFFFL
286};
287
288/***********************************************************************
289 * CFn_HookCallChk32 [internal]
290 */
292{
293 if (lpcf)
294 if(lpcf->Flags & CF_ENABLEHOOK)
295 if (lpcf->lpfnHook)
296 return TRUE;
297 return FALSE;
298}
299
300/*************************************************************************
301 * AddFontFamily [internal]
302 */
303static INT AddFontFamily(const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW *lpNTM,
304 UINT nFontType, const CHOOSEFONTW *lpcf, HWND hwnd, LPCFn_ENUMSTRUCT e)
305{
306 int i;
307 WORD w;
308 const LOGFONTW *lplf = &(lpElfex->elfLogFont);
309
310 TRACE("font=%s (nFontType=%d)\n", debugstr_w(lplf->lfFaceName), nFontType);
311
312 if (lpcf->Flags & CF_FIXEDPITCHONLY)
313 if (!(lplf->lfPitchAndFamily & FIXED_PITCH))
314 return 1;
315 if (lpcf->Flags & CF_ANSIONLY)
316 if (lplf->lfCharSet != ANSI_CHARSET)
317 return 1;
318 if (lpcf->Flags & CF_TTONLY)
319 if (!(nFontType & TRUETYPE_FONTTYPE))
320 return 1;
321 if (lpcf->Flags & CF_NOVERTFONTS)
322 if (lplf->lfFaceName[0] == '@')
323 return 1;
324
325 if (e) e->added++;
326
328 if (i == CB_ERR) {
330 if( i != CB_ERR) {
331 /* store some important font information */
332 w = (lplf->lfPitchAndFamily) << 8 |
333 (HIWORD(lpNTM->ntmTm.ntmFlags) & 0xff);
335 }
336 }
337 return 1;
338}
339
340/*************************************************************************
341 * FontFamilyEnumProc32 [internal]
342 */
344 const TEXTMETRICW *metrics, DWORD dwFontType, LPARAM lParam)
345{
348 return AddFontFamily( lpElfex, (const NEWTEXTMETRICEXW *) metrics,
349 dwFontType, e->lpcf32w, e->hWnd1, e);
350}
351
352/*************************************************************************
353 * SetFontStylesToCombo2 [internal]
354 *
355 * Fill font style information into combobox (without using font.c directly)
356 */
358{
359#define FSTYLES 4
360 struct FONTSTYLE
361 {
362 int italic;
363 int weight;
364 UINT resId;
365 };
366 static const struct FONTSTYLE fontstyles[FSTYLES]={
369 { 0, FW_BOLD, IDS_FONT_BOLD },
371 };
372 HFONT hf;
374 int i,j;
375 LOGFONTW lf;
376
377 lf = *lplf;
378
379 for (i=0;i<FSTYLES;i++)
380 {
381 lf.lfItalic=fontstyles[i].italic;
382 lf.lfWeight=fontstyles[i].weight;
383 hf=CreateFontIndirectW(&lf);
384 hf=SelectObject(hdc,hf);
386 hf=SelectObject(hdc,hf);
387 DeleteObject(hf);
388 /* font successful created ? */
389 if (((fontstyles[i].weight == FW_NORMAL && tm.tmWeight <= FW_MEDIUM) ||
390 (fontstyles[i].weight == FW_BOLD && tm.tmWeight > FW_MEDIUM)) &&
391 ((tm.tmItalic != 0)==fontstyles[i].italic))
392 {
393 WCHAR name[64];
394 LoadStringW(COMDLG32_hInstance, fontstyles[i].resId, name, 64);
396 if (j==CB_ERR) return TRUE;
398 MAKELONG(tm.tmWeight,fontstyles[i].italic));
399 if (j==CB_ERR) return TRUE;
400 }
401 }
402 return FALSE;
403}
404
405/*************************************************************************
406 * AddFontSizeToCombo3 [internal]
407 */
409{
410 int j;
411 WCHAR buffer[20];
412
413 if ( (!(lpcf->Flags & CF_LIMITSIZE)) ||
414 ((lpcf->Flags & CF_LIMITSIZE) && (h >= lpcf->nSizeMin) && (h <= lpcf->nSizeMax)))
415 {
418 if (j==CB_ERR)
419 {
422 if (j==CB_ERR) return TRUE;
423 }
424 }
425 return FALSE;
426}
427
428/*************************************************************************
429 * SetFontSizesToCombo3 [internal]
430 */
432{
433 static const BYTE sizes[]={6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72};
434 unsigned int i;
435
436 for (i = 0; i < ARRAY_SIZE(sizes); i++)
437 if (AddFontSizeToCombo3(hwnd, sizes[i], lpcf)) return TRUE;
438 return FALSE;
439}
440
441/*************************************************************************
442 * CFn_GetDC [internal]
443 */
444static inline HDC CFn_GetDC(const CHOOSEFONTW *lpcf)
445{
446 HDC ret = ((lpcf->Flags & CF_PRINTERFONTS) && lpcf->hDC) ?
447 lpcf->hDC :
448 GetDC(0);
449 if(!ret) ERR("HDC failure!!!\n");
450 return ret;
451}
452
453/*************************************************************************
454 * GetScreenDPI [internal]
455 */
456static inline int GetScreenDPI(void)
457{
458 HDC hdc;
459 int result;
460
461 hdc = GetDC(0);
463 ReleaseDC(0, hdc);
464
465 return result;
466}
467
468/*************************************************************************
469 * CFn_ReleaseDC [internal]
470 */
471static inline void CFn_ReleaseDC(const CHOOSEFONTW *lpcf, HDC hdc)
472{
473 if(!((lpcf->Flags & CF_PRINTERFONTS) && lpcf->hDC))
474 ReleaseDC(0, hdc);
475}
476
477/*************************************************************************
478 * select_combo_item [internal]
479 */
480static void select_combo_item( HWND dialog, int id, int sel )
481{
482 HWND combo = GetDlgItem( dialog, id );
483 SendMessageW( combo, CB_SETCURSEL, sel, 0 );
485}
486
487/***********************************************************************
488 * AddFontStyle [internal]
489 */
490static INT AddFontStyle( const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW *lpNTM,
491 UINT nFontType, const CHOOSEFONTW *lpcf, HWND hcmb2, HWND hcmb3, HWND hDlg)
492{
493 int i;
494 const LOGFONTW *lplf = &(lpElfex->elfLogFont);
495 HWND hcmb5;
496 HDC hdc;
497
498 TRACE("(nFontType=%d)\n",nFontType);
499 TRACE(" %s h=%ld w=%ld e=%ld o=%ld wg=%ld i=%d u=%d s=%d"
500 " ch=%d op=%d cp=%d q=%d pf=%xh\n",
501 debugstr_w(lplf->lfFaceName),lplf->lfHeight,lplf->lfWidth,
502 lplf->lfEscapement,lplf->lfOrientation,
503 lplf->lfWeight,lplf->lfItalic,lplf->lfUnderline,
504 lplf->lfStrikeOut,lplf->lfCharSet, lplf->lfOutPrecision,
505 lplf->lfClipPrecision,lplf->lfQuality, lplf->lfPitchAndFamily);
506 if (nFontType & RASTER_FONTTYPE)
507 {
508 INT points;
510 72, GetScreenDPI());
511 if (AddFontSizeToCombo3(hcmb3, points, lpcf))
512 return 0;
513 } else if (SetFontSizesToCombo3(hcmb3, lpcf)) return 0;
514
515 if (!SendMessageW(hcmb2, CB_GETCOUNT, 0, 0))
516 {
517 BOOL res;
518 if(!(hdc = CFn_GetDC(lpcf))) return 0;
519 res = SetFontStylesToCombo2(hcmb2,hdc,lplf);
520 CFn_ReleaseDC(lpcf, hdc);
521 if (res)
522 return 0;
523 }
524 if (!( hcmb5 = GetDlgItem(hDlg, cmb5))) return 1;
525 i = SendMessageW( hcmb5, CB_FINDSTRINGEXACT, 0,
526 (LPARAM)lpElfex->elfScript);
527 if( i == CB_ERR) {
528 i = SendMessageW( hcmb5, CB_ADDSTRING, 0,
529 (LPARAM)lpElfex->elfScript);
530 if( i != CB_ERR)
531 SendMessageW( hcmb5, CB_SETITEMDATA, i, lplf->lfCharSet);
532 }
533 return 1 ;
534}
535
536static void CFn_FitFontSize( HWND hDlg, int points)
537{
538 int i,n;
539
540 /* look for fitting font size in combobox3 */
542 for (i=0;i<n;i++)
543 {
544 if (points == (int)SendDlgItemMessageW
545 (hDlg,cmb3, CB_GETITEMDATA,i,0))
546 {
547 select_combo_item( hDlg, cmb3, i );
548 return;
549 }
550 }
551
552 /* no default matching size, set text manually */
553 SetDlgItemInt(hDlg, cmb3, points, TRUE);
554}
555
556static BOOL CFn_FitFontStyle( HWND hDlg, LONG packedstyle )
557{
558 LONG id;
559 int i;
560 /* look for fitting font style in combobox2 */
561 for (i=0;i<TEXT_EXTRAS;i++)
562 {
563 id = SendDlgItemMessageW(hDlg, cmb2, CB_GETITEMDATA, i, 0);
564 if (packedstyle == id)
565 {
566 select_combo_item( hDlg, cmb2, i );
567 return TRUE;
568 }
569 }
570 return FALSE;
571}
572
573
574static BOOL CFn_FitCharSet( HWND hDlg, int charset )
575{
576 int i,n,cs;
577 /* look for fitting char set in combobox5 */
579 for (i=0;i<n;i++)
580 {
582 if (charset == cs)
583 {
584 select_combo_item( hDlg, cmb5, i );
585 return TRUE;
586 }
587 }
588 /* no charset fits: select the first one in the list */
589 select_combo_item( hDlg, cmb5, 0 );
590 return FALSE;
591}
592
593/***********************************************************************
594 * FontStyleEnumProc32 [internal]
595 */
597 const TEXTMETRICW *metrics, DWORD dwFontType, LPARAM lParam )
598{
600 HWND hcmb2=s->hWnd1;
601 HWND hcmb3=s->hWnd2;
602 HWND hDlg=GetParent(hcmb3);
603 return AddFontStyle( lpElfex, (const NEWTEXTMETRICEXW *) metrics,
604 dwFontType, s->lpcf32w, hcmb2, hcmb3, hDlg);
605}
606
607/***********************************************************************
608 * CFn_WMInitDialog [internal]
609 */
611{
612 HDC hdc;
613 int i,j;
614 BOOL init = FALSE;
615 long pstyle;
617 LPLOGFONTW lpxx;
619
620 SetPropW(hDlg, strWineFontData, lpcf);
621 lpxx=lpcf->lpLogFont;
622 TRACE("WM_INITDIALOG lParam=%08IX\n", lParam);
623
624 if (lpcf->lStructSize != sizeof(CHOOSEFONTW))
625 {
626 ERR("structure size failure!!!\n");
627 EndDialog (hDlg, 0);
628 return FALSE;
629 }
630 if (!himlTT)
633
634 /* Set effect flags */
635 if((lpcf->Flags & CF_EFFECTS) && (lpcf->Flags & CF_INITTOLOGFONTSTRUCT))
636 {
637 if(lpxx->lfUnderline)
638 CheckDlgButton(hDlg, chx2, TRUE);
639 if(lpxx->lfStrikeOut)
640 CheckDlgButton(hDlg, chx1, TRUE);
641 }
642
643 if (!(lpcf->Flags & CF_SHOWHELP) || !IsWindow(lpcf->hwndOwner))
645 if (!(lpcf->Flags & CF_APPLY))
647 if (lpcf->Flags & CF_NOSCRIPTSEL)
649 if (lpcf->Flags & CF_EFFECTS)
650 {
651 for (i=0;i<TEXT_COLORS;i++)
652 {
653 WCHAR name[30];
654
656 lstrcpyW(name, L"[color name]");
659 /* look for a fitting value in color combobox */
660 if (textcolors[i]==lpcf->rgbColors)
662 }
663 }
664 else
665 {
671 }
672 if(!(hdc = CFn_GetDC(lpcf)))
673 {
674 EndDialog (hDlg, 0);
675 return FALSE;
676 }
677 s.hWnd1=GetDlgItem(hDlg,cmb1);
678 s.lpcf32w=lpcf;
679 do {
680 LOGFONTW elf;
681 s.added = 0;
682 elf.lfCharSet = DEFAULT_CHARSET; /* enum all charsets */
683 elf.lfPitchAndFamily = 0;
684 elf.lfFaceName[0] = '\0'; /* enum all fonts */
686 {
687 TRACE("EnumFontFamiliesEx returns 0\n");
688 break;
689 }
690 if (s.added) break;
691 if (lpcf->Flags & CF_FIXEDPITCHONLY) {
692 FIXME("No font found with fixed pitch only, dropping flag.\n");
693 lpcf->Flags &= ~CF_FIXEDPITCHONLY;
694 continue;
695 }
696 if (lpcf->Flags & CF_TTONLY) {
697 FIXME("No font found with truetype only, dropping flag.\n");
698 lpcf->Flags &= ~CF_TTONLY;
699 continue;
700 }
701 break;
702 } while (1);
703
704
705 if (lpcf->Flags & CF_INITTOLOGFONTSTRUCT)
706 {
707 /* look for fitting font name in combobox1 */
709 if (j!=CB_ERR)
710 {
711 INT height = lpxx->lfHeight < 0 ? -lpxx->lfHeight :
712 lpxx->lfHeight;
713 INT points;
714 int charset = lpxx->lfCharSet;
715 points = MulDiv( height, 72, GetScreenDPI());
716 pstyle = MAKELONG(lpxx->lfWeight > FW_MEDIUM ? FW_BOLD:
717 FW_NORMAL,lpxx->lfItalic !=0);
718 select_combo_item( hDlg, cmb1, j );
719 init = TRUE;
720 /* look for fitting font style in combobox2 */
721 CFn_FitFontStyle(hDlg, pstyle);
722 /* look for fitting font size in combobox3 */
723 CFn_FitFontSize(hDlg, points);
724 CFn_FitCharSet( hDlg, charset );
725 }
726 }
727 if (!init)
728 {
729 select_combo_item( hDlg, cmb1, 0 );
730 select_combo_item( hDlg, cmb2, 0 );
731 select_combo_item( hDlg, cmb3, 0 );
732 select_combo_item( hDlg, cmb5, 0 );
733 }
734 /* limit text length user can type in as font size */
736
737 if ((lpcf->Flags & CF_USESTYLE) && lpcf->lpszStyle)
738 {
740 if (j!=CB_ERR) select_combo_item( hDlg, cmb2, j );
741 }
742 CFn_ReleaseDC(lpcf, hdc);
743 SetCursor(hcursor);
744 return TRUE;
745}
746
747
748/***********************************************************************
749 * CFn_WMMeasureItem [internal]
750 */
752{
753 HDC hdc;
754 HFONT hfontprev;
757 INT height = 0, cx;
758
759 if (!himlTT)
763 lpmi->itemHeight = height + 2;
764 /* use MAX of bitmap height and tm.tmHeight .*/
765 hdc=GetDC(hDlg);
766 if(!hdc) return 0;
767 hfontprev = SelectObject( hdc, (HFONT)SendMessageW( hDlg, WM_GETFONT, 0, 0 ));
769 if( tm.tmHeight > lpmi->itemHeight) lpmi->itemHeight = tm.tmHeight;
770 SelectObject(hdc, hfontprev);
771 ReleaseDC(hDlg, hdc);
772 return 0;
773}
774
775
776/***********************************************************************
777 * CFn_WMDrawItem [internal]
778 */
780{
781 HBRUSH hBrush;
782 WCHAR buffer[40];
783 COLORREF cr, oldText=0, oldBk=0;
784 RECT rect;
785 int nFontType;
786 int cx, cy, idx;
788
789 if (lpdi->itemID == (UINT)-1) /* got no items */
790 DrawFocusRect(lpdi->hDC, &lpdi->rcItem);
791 else
792 {
793 if (lpdi->CtlType == ODT_COMBOBOX)
794 {
795 if (lpdi->itemState & ODS_SELECTED)
796 {
800 } else
801 {
803 SelectObject(lpdi->hDC, hBrush);
804 }
805 FillRect(lpdi->hDC, &lpdi->rcItem, hBrush);
806 }
807 else
808 return TRUE; /* this should never happen */
809
810 rect=lpdi->rcItem;
811 switch (lpdi->CtlID)
812 {
813 case cmb1:
814 /* TRACE(commdlg,"WM_Drawitem cmb1\n"); */
817 (LPARAM)buffer);
818 TextOutW(lpdi->hDC, lpdi->rcItem.left + cx + 4,
819 lpdi->rcItem.top, buffer, lstrlenW(buffer));
820 nFontType = SendMessageW(lpdi->hwndItem, CB_GETITEMDATA, lpdi->itemID,0L);
821 idx = -1;
822 if (nFontType & TRUETYPE_FONTTYPE) {
823 idx = 0; /* picture: TT */
824 if( nFontType & NTM_TT_OPENTYPE)
825 idx = 2; /* picture: O */
826 } else if( nFontType & NTM_PS_OPENTYPE)
827 idx = 3; /* picture: O+ps */
828 else if( nFontType & NTM_TYPE1)
829 idx = 4; /* picture: a */
830 else if( nFontType & DEVICE_FONTTYPE)
831 idx = 1; /* picture: printer */
832 if( idx >= 0)
833 ImageList_Draw( himlTT, idx, lpdi->hDC, lpdi->rcItem.left,
834 (lpdi->rcItem.top + lpdi->rcItem.bottom - cy) / 2, ILD_TRANSPARENT);
835 break;
836 case cmb2:
837 case cmb3:
838 /* TRACE(commdlg,"WM_DRAWITEN cmb2,cmb3\n"); */
839 case cmb5:
841 (LPARAM)buffer);
842 TextOutW(lpdi->hDC, lpdi->rcItem.left,
843 lpdi->rcItem.top, buffer, lstrlenW(buffer));
844 break;
845
846 case cmb4:
847 /* TRACE(commdlg,"WM_DRAWITEM cmb4 (=COLOR)\n"); */
849 (LPARAM)buffer);
850 TextOutW(lpdi->hDC, lpdi->rcItem.left + 25+5,
851 lpdi->rcItem.top, buffer, lstrlenW(buffer));
852 cr = SendMessageW(lpdi->hwndItem, CB_GETITEMDATA, lpdi->itemID,0L);
853 hBrush = CreateSolidBrush(cr);
854 if (hBrush)
855 {
856 hBrush = SelectObject (lpdi->hDC, hBrush) ;
857 rect.right=rect.left+25;
858 rect.top++;
859 rect.left+=5;
860 rect.bottom--;
861 Rectangle( lpdi->hDC, rect.left, rect.top,
863 DeleteObject( SelectObject (lpdi->hDC, hBrush)) ;
864 }
865 rect=lpdi->rcItem;
866 rect.left+=25+5;
867 break;
868
869 default:
870 return TRUE; /* this should never happen */
871 }
872 if (lpdi->itemState & ODS_SELECTED)
873 {
874 SetTextColor(lpdi->hDC, oldText);
875 SetBkColor(lpdi->hDC, oldBk);
876 }
877 }
878 return TRUE;
879}
880
882{
883 BOOL invalid_size = FALSE;
884 INT i, size;
885
886 i = SendDlgItemMessageW(hDlg, cmb3, CB_GETCURSEL, 0, 0);
887 if (i != CB_ERR)
889 else
890 {
891 WCHAR buffW[8], *endptrW;
892
893 GetDlgItemTextW(hDlg, cmb3, buffW, ARRAY_SIZE(buffW));
894 size = wcstol(buffW, &endptrW, 10);
895 invalid_size = size == 0 && *endptrW;
896
897 if (size == 0)
898 size = 10;
899 }
900
901 cf->iPointSize = 10 * size;
902 cf->lpLogFont->lfHeight = -MulDiv(cf->iPointSize, GetScreenDPI(), 720);
903 return invalid_size ? -1 : size;
904}
905
906/***********************************************************************
907 * CFn_WMCommand [internal]
908 */
910{
911 int i;
912 long l;
913 HDC hdc;
914 BOOL cmb_selected_by_edit = FALSE;
915
916 if (!lpcf) return FALSE;
917
919 {
920 int idx;
921 WCHAR str_edit[256], str_cmb[256];
922 int cmb = LOWORD(wParam);
923
924 GetDlgItemTextW(hDlg, cmb, str_edit, ARRAY_SIZE(str_edit));
925 idx = SendDlgItemMessageW(hDlg, cmb, CB_FINDSTRING, -1, (LPARAM)str_edit);
926 if(idx != -1)
927 {
928 SendDlgItemMessageW(hDlg, cmb, CB_GETLBTEXT, idx, (LPARAM)str_cmb);
929
930 /* Select listbox entry only if we have an exact match */
931 if(lstrcmpiW(str_edit, str_cmb) == 0)
932 {
933 SendDlgItemMessageW(hDlg, cmb, CB_SETCURSEL, idx, 0);
934 SendDlgItemMessageW(hDlg, cmb, CB_SETEDITSEL, 0, -1); /* Remove edit field selection */
935 cmb_selected_by_edit = TRUE;
936 }
937 }
938 }
939
940 TRACE("WM_COMMAND wParam=%08IX lParam=%08IX\n", wParam, lParam);
941 switch (LOWORD(wParam))
942 {
943 case cmb1:
944 if (HIWORD(wParam) == CBN_SELCHANGE || cmb_selected_by_edit)
945 {
946 INT pointsize; /* save current pointsize */
947 LONG pstyle; /* save current style */
948 int charset;
949 int idx;
950 if(!(hdc = CFn_GetDC(lpcf)))
951 {
952 EndDialog (hDlg, 0);
953 return TRUE;
954 }
956 pointsize = (int)SendDlgItemMessageW( hDlg, cmb3, CB_GETITEMDATA,
957 idx, 0);
959 pstyle = SendDlgItemMessageW(hDlg, cmb2, CB_GETITEMDATA, idx, 0);
962
967 if (i!=CB_ERR)
968 {
971 LOGFONTW enumlf;
973 (LPARAM)enumlf.lfFaceName);
974 TRACE("WM_COMMAND/cmb1 =>%s\n", debugstr_w(enumlf.lfFaceName));
975 s.hWnd1=GetDlgItem(hDlg, cmb2);
976 s.hWnd2=GetDlgItem(hDlg, cmb3);
977 s.lpcf32w=lpcf;
978 enumlf.lfCharSet = DEFAULT_CHARSET; /* enum all charsets */
979 enumlf.lfPitchAndFamily = 0;
980 EnumFontFamiliesExW(hdc, &enumlf,
982 CFn_FitFontStyle(hDlg, pstyle);
983 if( pointsize != CB_ERR) CFn_FitFontSize(hDlg, pointsize);
984 if( charset != CB_ERR) CFn_FitCharSet( hDlg, charset );
985 SetCursor(hcursor);
986 }
987 CFn_ReleaseDC(lpcf, hdc);
988 }
989 break;
990 case chx1:
991 case chx2:
992 case cmb2:
993 case cmb3:
994 case cmb5:
995 if (HIWORD(wParam) == CBN_SELCHANGE || HIWORD(wParam) == BN_CLICKED || cmb_selected_by_edit)
996 {
997 WCHAR str[256];
998 WINDOWINFO wininfo;
999 LPLOGFONTW lpxx=lpcf->lpLogFont;
1000
1001 TRACE("WM_COMMAND/cmb2,3 =%08IX\n", lParam);
1002
1003 /* face name */
1005 if (i==CB_ERR)
1007 else
1008 {
1010 (LPARAM)str);
1012 lpcf->nFontType = LOWORD(l);
1013 /* FIXME: lpcf->nFontType |= .... SIMULATED_FONTTYPE and so */
1014 /* same value reported to the EnumFonts
1015 call back with the extra FONTTYPE_... bits added */
1016 lpxx->lfPitchAndFamily = HIWORD(l) >> 8;
1017 }
1019
1020 /* style */
1021 i=SendDlgItemMessageW(hDlg, cmb2, CB_GETCURSEL, 0, 0);
1022 if (i!=CB_ERR)
1023 {
1025 if (0!=(lpxx->lfItalic=HIWORD(l)))
1026 lpcf->nFontType |= ITALIC_FONTTYPE;
1027 if ((lpxx->lfWeight=LOWORD(l)) > FW_MEDIUM)
1028 lpcf->nFontType |= BOLD_FONTTYPE;
1029 }
1030
1031 /* size */
1032 get_dialog_font_point_size(hDlg, lpcf);
1033
1034 /* charset */
1035 if (lpcf->Flags & CF_NOSCRIPTSEL)
1036 lpxx->lfCharSet = DEFAULT_CHARSET;
1037 else
1038 {
1039 i=SendDlgItemMessageW(hDlg, cmb5, CB_GETCURSEL, 0, 0);
1040 if (i!=CB_ERR)
1042 else
1043 lpxx->lfCharSet = DEFAULT_CHARSET;
1044 }
1047 lpxx->lfWidth=lpxx->lfOrientation=lpxx->lfEscapement=0;
1051
1052 wininfo.cbSize=sizeof(wininfo);
1053
1054 if( GetWindowInfo( GetDlgItem( hDlg, stc5), &wininfo ) )
1055 {
1056 MapWindowPoints( 0, hDlg, (LPPOINT) &wininfo.rcWindow, 2);
1057 InvalidateRect( hDlg, &wininfo.rcWindow, TRUE );
1058 }
1059 }
1060 break;
1061
1062 case cmb4:
1063 i=SendDlgItemMessageW(hDlg, cmb4, CB_GETCURSEL, 0, 0);
1064 if (i!=CB_ERR)
1065 {
1066 WINDOWINFO wininfo;
1067
1069 wininfo.cbSize=sizeof(wininfo);
1070
1071 if( GetWindowInfo( GetDlgItem( hDlg, stc5), &wininfo ) )
1072 {
1073 MapWindowPoints( 0, hDlg, (LPPOINT) &wininfo.rcWindow, 2);
1074 InvalidateRect( hDlg, &wininfo.rcWindow, TRUE );
1075 }
1076 }
1077 break;
1078
1079 case psh15:
1081 if (lpcf->hwndOwner)
1083 break;
1084
1085 case IDOK:
1086 {
1087 WCHAR msgW[80];
1088 INT pointsize;
1089
1090 pointsize = get_dialog_font_point_size(hDlg, lpcf);
1091 if (pointsize == -1)
1092 {
1094 MessageBoxW(hDlg, msgW, NULL, MB_OK | MB_ICONINFORMATION);
1095 return TRUE;
1096 }
1097
1098 if ( (!(lpcf->Flags & CF_LIMITSIZE)) ||
1099 ( (lpcf->Flags & CF_LIMITSIZE) &&
1100 (lpcf->iPointSize >= 10 * lpcf->nSizeMin) &&
1101 (lpcf->iPointSize <= 10 * lpcf->nSizeMax)))
1102 EndDialog(hDlg, TRUE);
1103 else
1104 {
1105 WCHAR format[80];
1106 DWORD_PTR args[2];
1108 args[0] = lpcf->nSizeMin;
1109 args[1] = lpcf->nSizeMax;
1111 format, 0, 0, msgW, ARRAY_SIZE(msgW), (va_list *)args);
1112 MessageBoxW(hDlg, msgW, NULL, MB_OK);
1113 }
1114 return(TRUE);
1115 }
1116 case IDCANCEL:
1117 EndDialog(hDlg, FALSE);
1118 return(TRUE);
1119 }
1120 return(FALSE);
1121}
1122
1124{
1125 LPCHOOSEFONTA lpcfa;
1126 LPSTR lpszStyle;
1127 LPLOGFONTA lpLogFonta;
1128 int len;
1129
1130 if (!lpcfw) return FALSE;
1131
1133 lpLogFonta = lpcfa->lpLogFont;
1134 lpszStyle = lpcfa->lpszStyle;
1135 memcpy(lpcfa, lpcfw, sizeof(CHOOSEFONTA));
1136 lpcfa->lpLogFont = lpLogFonta;
1137 lpcfa->lpszStyle = lpszStyle;
1138 memcpy(lpcfa->lpLogFont, lpcfw->lpLogFont, sizeof(LOGFONTA));
1141
1142 if((lpcfw->Flags & CF_USESTYLE) && lpcfw->lpszStyle) {
1143 len = WideCharToMultiByte(CP_ACP, 0, lpcfw->lpszStyle, -1, NULL, 0, 0, 0);
1144 WideCharToMultiByte(CP_ACP, 0, lpcfw->lpszStyle, -1, lpcfa->lpszStyle, len, 0, 0);
1145 heap_free(lpcfw->lpszStyle);
1146 }
1147
1148 heap_free(lpcfw->lpLogFont);
1149 heap_free(lpcfw);
1151
1152 return TRUE;
1153}
1154
1156{
1158
1159 if (!lpcf) return FALSE;
1160
1161 info.cbSize=sizeof(info);
1162 if( GetWindowInfo( GetDlgItem( hDlg, stc5), &info ) )
1163 {
1164 PAINTSTRUCT ps;
1165 HDC hdc;
1166 HFONT hOrigFont;
1167 LOGFONTW lf = *(lpcf->lpLogFont);
1168
1169 MapWindowPoints( 0, hDlg, (LPPOINT) &info.rcWindow, 2);
1170 hdc = BeginPaint( hDlg, &ps );
1171
1172 TRACE("erase %d, rect=%s\n", ps.fErase, wine_dbgstr_rect(&ps.rcPaint));
1173
1174 /* Paint frame */
1175 DrawEdge( hdc, &info.rcWindow, EDGE_SUNKEN, BF_RECT|BF_ADJUST );
1176
1177 /* Draw the sample text itself */
1178 hOrigFont = SelectObject( hdc, CreateFontIndirectW( &lf ) );
1179 SetTextColor( hdc, lpcf->rgbColors );
1181
1182 DrawTextW( hdc,
1184 -1, &info.rcWindow, DT_CENTER|DT_VCENTER|DT_SINGLELINE );
1185
1186 DeleteObject(SelectObject( hdc, hOrigFont ));
1187 EndPaint( hDlg, &ps );
1188 }
1189 return FALSE;
1190}
1191
1192/***********************************************************************
1193 * FormatCharDlgProcA [internal]
1194 */
1196{
1197 LPCHOOSEFONTW lpcfw;
1198 LPCHOOSEFONTA lpcfa;
1199 INT_PTR res = FALSE;
1200 int len;
1201
1202 if (uMsg!=WM_INITDIALOG) {
1203 lpcfw = GetPropW(hDlg, strWineFontData);
1204 if (lpcfw && CFn_HookCallChk32(lpcfw))
1205 res=CallWindowProcA((WNDPROC)lpcfw->lpfnHook, hDlg, uMsg, wParam, lParam);
1206 if (res)
1207 return res;
1208 } else {
1209 lpcfa=(LPCHOOSEFONTA)lParam;
1211
1212 lpcfw = heap_alloc(sizeof(*lpcfw));
1213 memcpy(lpcfw, lpcfa, sizeof(CHOOSEFONTA));
1214 lpcfw->lpLogFont = heap_alloc(sizeof(*lpcfw->lpLogFont));
1215 memcpy(lpcfw->lpLogFont, lpcfa->lpLogFont, sizeof(LOGFONTA));
1218
1219 if((lpcfa->Flags & CF_USESTYLE) && lpcfa->lpszStyle) {
1220 len = MultiByteToWideChar(CP_ACP, 0, lpcfa->lpszStyle, -1, NULL, 0);
1221 lpcfw->lpszStyle = heap_alloc(len * sizeof(WCHAR));
1222 MultiByteToWideChar(CP_ACP, 0, lpcfa->lpszStyle, -1, lpcfw->lpszStyle, len);
1223 }
1224
1225 if (!CFn_WMInitDialog(hDlg, lParam, lpcfw))
1226 {
1227 TRACE("CFn_WMInitDialog returned FALSE\n");
1228 return FALSE;
1229 }
1230 if (CFn_HookCallChk32(lpcfw))
1232 }
1233 switch (uMsg)
1234 {
1235 case WM_MEASUREITEM:
1236 return CFn_WMMeasureItem(hDlg,lParam);
1237 case WM_DRAWITEM:
1238 return CFn_WMDrawItem(lParam);
1239 case WM_COMMAND:
1240 return CFn_WMCommand(hDlg, wParam, lParam, lpcfw);
1241 case WM_DESTROY:
1242 return CFn_WMDestroy(hDlg, lpcfw);
1244 {
1245 LOGFONTA *logfont = (LOGFONTA *)lParam;
1246 TRACE("WM_CHOOSEFONT_GETLOGFONT lParam=%08IX\n", lParam);
1247 memcpy( logfont, lpcfw->lpLogFont, FIELD_OFFSET( LOGFONTA, lfFaceName ));
1249 logfont->lfFaceName, LF_FACESIZE, NULL, NULL );
1250 break;
1251 }
1252 case WM_PAINT:
1253 return CFn_WMPaint(hDlg, wParam, lParam, lpcfw);
1254 }
1255 return res;
1256}
1257
1258/***********************************************************************
1259 * FormatCharDlgProcW [internal]
1260 */
1262{
1263 LPCHOOSEFONTW lpcf;
1264 INT_PTR res = FALSE;
1265
1266 if (uMsg!=WM_INITDIALOG)
1267 {
1268 lpcf= GetPropW(hDlg, strWineFontData);
1269 if (lpcf && CFn_HookCallChk32(lpcf))
1270 res=CallWindowProcW((WNDPROC)lpcf->lpfnHook, hDlg, uMsg, wParam, lParam);
1271 if (res)
1272 return res;
1273 }
1274 else
1275 {
1276 lpcf=(LPCHOOSEFONTW)lParam;
1277 if (!CFn_WMInitDialog(hDlg, lParam, lpcf))
1278 {
1279 TRACE("CFn_WMInitDialog returned FALSE\n");
1280 return FALSE;
1281 }
1282 if (CFn_HookCallChk32(lpcf))
1284 }
1285 switch (uMsg)
1286 {
1287 case WM_MEASUREITEM:
1288 return CFn_WMMeasureItem(hDlg, lParam);
1289 case WM_DRAWITEM:
1290 return CFn_WMDrawItem(lParam);
1291 case WM_COMMAND:
1292 return CFn_WMCommand(hDlg, wParam, lParam, lpcf);
1293 case WM_DESTROY:
1294 return TRUE;
1296 TRACE("WM_CHOOSEFONT_GETLOGFONT lParam=%08IX\n", lParam);
1297 memcpy( (LOGFONTW *)lParam, lpcf->lpLogFont, sizeof(LOGFONTW) );
1298 break;
1299 case WM_PAINT:
1300 return CFn_WMPaint(hDlg, wParam, lParam, lpcf);
1301 }
1302 return res;
1303}
xD9 x84 xD8 xAD xD9 x80 xF0 x90 xAC x9A xE0 xA7 xA6 xE0 xA7 xAA xF0 x91 x84 xA4 xF0 x91 x84 x89 xF0 x91 x84 x9B xF0 x90 x8A xAB xF0 x90 x8B x89 xE2 xB2 x9E xE2 xB2 x9F xD0 xBE xD0 x9E xF0 x90 x90 x84 xF0 x90 x90 xAC xE1 x83 x98 xE1 x83 x94 xE1 x83 x90 xE1 xB2 xBF xE2 xB0 x95 xE2 xB1 x85 xCE xBF xCE x9F xE0 xA8 xA0 xE0 xA8 xB0 xE0 xA9 xA6 Kayah xEA xA4 x8D xEA xA4 x80 Khmer xE1 xA7 xA1 xE1 xA7 xAA xE0 xBB x90 Latin Subscript xE2 x82 x92 xE2 x82 x80 xEA x93 xB3 xF0 x96 xB9 xA1 xF0 x96 xB9 x9B xF0 x96 xB9 xAF xE1 x80 x9D xE1 x80 x84 xE1 x80 x82 no Old xF0 x90 xB0 x97 xF0 x90 x92 x86 xF0 x90 x92 xA0 xEA xA2 x9D xEA xA3 x90 xE0 xB6 xA7 xE0 xAF xA6 xE0 xB1 xA6 xE0 xB1 xA7 THAI
Definition: afscript.h:357
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:20
#define FIXME(fmt,...)
Definition: precomp.h:53
#define ERR(fmt,...)
Definition: precomp.h:57
r l[0]
Definition: byte_order.h:168
#define CDERR_LOADRESFAILURE
Definition: cderr.h:12
#define CDERR_FINDRESFAILURE
Definition: cderr.h:11
#define IDS_FONT_BOLD_ITALIC
Definition: cdlg.h:134
#define IDS_FONT_ITALIC
Definition: cdlg.h:133
#define IDS_FONT_SIZE_INPUT
Definition: cdlg.h:162
#define IDS_COLOR_BLACK
Definition: cdlg.h:138
#define IDS_FONT_SIZE
Definition: cdlg.h:155
#define IDS_FONT_REGULAR
Definition: cdlg.h:131
void COMDLG32_SetCommDlgExtendedError(DWORD err)
Definition: cdlg32.c:124
#define IDS_FONT_BOLD
Definition: cdlg.h:132
HINSTANCE COMDLG32_hInstance
Definition: cdlg32.c:42
CFF_Charset charset
Definition: cffcmap.c:137
RECT rect
Definition: combotst.c:67
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define CF_SCALABLEONLY
Definition: commdlg.h:79
#define CF_APPLY
Definition: commdlg.h:69
#define CF_ENABLETEMPLATEHANDLE
Definition: commdlg.h:65
#define CF_NOSIMULATIONS
Definition: commdlg.h:74
#define CF_EFFECTS
Definition: commdlg.h:68
#define CF_SELECTSCRIPT
Definition: commdlg.h:84
#define CF_TTONLY
Definition: commdlg.h:80
#define CF_NOSIZESEL
Definition: commdlg.h:83
#define CF_ENABLETEMPLATE
Definition: commdlg.h:64
#define HELPMSGSTRINGW
Definition: commdlg.h:27
#define CF_WYSIWYG
Definition: commdlg.h:77
#define CF_NOFACESEL
Definition: commdlg.h:81
#define CF_ENABLEHOOK
Definition: commdlg.h:63
#define CF_INITTOLOGFONTSTRUCT
Definition: commdlg.h:66
#define CF_NOVECTORFONTS
Definition: commdlg.h:72
#define CF_ANSIONLY
Definition: commdlg.h:70
#define CF_USESTYLE
Definition: commdlg.h:67
#define CF_NOVERTFONTS
Definition: commdlg.h:86
#define BOLD_FONTTYPE
Definition: commdlg.h:90
#define CF_SHOWHELP
Definition: commdlg.h:62
#define CF_PRINTERFONTS
Definition: commdlg.h:60
#define CF_NOSCRIPTSEL
Definition: commdlg.h:85
#define CF_LIMITSIZE
Definition: commdlg.h:75
#define CF_NOSTYLESEL
Definition: commdlg.h:82
#define WM_CHOOSEFONT_GETLOGFONT
Definition: commdlg.h:93
struct tagCHOOSEFONTA * LPCHOOSEFONTA
#define CF_FORCEFONTEXIST
Definition: commdlg.h:78
struct tagCHOOSEFONTW * LPCHOOSEFONTW
#define ITALIC_FONTTYPE
Definition: commdlg.h:91
#define CF_SCREENFONTS
Definition: commdlg.h:59
#define CF_FIXEDPITCHONLY
Definition: commdlg.h:76
#define LF_FACESIZE
Definition: dimm.idl:39
#define cmb1
Definition: dlgs.h:53
#define pshHelp
Definition: dlgs.h:132
#define stc5
Definition: dlgs.h:169
#define cmb3
Definition: dlgs.h:55
#define psh3
Definition: dlgs.h:119
#define cmb5
Definition: dlgs.h:57
#define cmb4
Definition: dlgs.h:56
#define stc4
Definition: dlgs.h:168
#define grp1
Definition: dlgs.h:91
#define chx1
Definition: dlgs.h:36
#define chx2
Definition: dlgs.h:37
#define cmb2
Definition: dlgs.h:54
#define psh15
Definition: dlgs.h:131
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int idx
Definition: utils.c:40
BOOL WINAPI ImageList_Draw(HIMAGELIST himl, INT i, HDC hdc, INT x, INT y, UINT fStyle)
Definition: imagelist.c:1246
HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE hi, LPCWSTR lpbmp, INT cx, INT cGrow, COLORREF clrMask, UINT uType, UINT uFlags)
Definition: imagelist.c:2226
BOOL WINAPI ImageList_GetIconSize(HIMAGELIST himl, INT *cx, INT *cy)
Definition: imagelist.c:2055
static const WCHAR strWineFontData_a[]
Definition: fontdlg.c:51
static HDC CFn_GetDC(const CHOOSEFONTW *lpcf)
Definition: fontdlg.c:444
static BOOL CFn_FitFontStyle(HWND hDlg, LONG packedstyle)
Definition: fontdlg.c:556
static INT AddFontStyle(const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW *lpNTM, UINT nFontType, const CHOOSEFONTW *lpcf, HWND hcmb2, HWND hcmb3, HWND hDlg)
Definition: fontdlg.c:490
static LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam, LPCHOOSEFONTW lpcf)
Definition: fontdlg.c:909
static INT_PTR CALLBACK FormatCharDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: fontdlg.c:1195
BOOL WINAPI ChooseFontW(LPCHOOSEFONTW lpChFont)
Definition: fontdlg.c:175
static BOOL SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTW *lplf)
Definition: fontdlg.c:357
static LRESULT CFn_WMDrawItem(LPARAM lParam)
Definition: fontdlg.c:779
#define TTBITMAP_XSIZE
Definition: fontdlg.c:55
static const struct @435 cfflags[]
BOOL WINAPI ChooseFontA(LPCHOOSEFONTA lpChFont)
Definition: fontdlg.c:229
static void select_combo_item(HWND dialog, int id, int sel)
Definition: fontdlg.c:480
static LRESULT CFn_WMInitDialog(HWND hDlg, LPARAM lParam, LPCHOOSEFONTW lpcf)
Definition: fontdlg.c:610
static void CFn_FitFontSize(HWND hDlg, int points)
Definition: fontdlg.c:536
static void _dump_cf_flags(DWORD cflags)
Definition: fontdlg.c:152
#define XX(x)
static INT get_dialog_font_point_size(HWND hDlg, CHOOSEFONTW *cf)
Definition: fontdlg.c:881
const char * name
Definition: fontdlg.c:121
struct CFn_ENUMSTRUCT * LPCFn_ENUMSTRUCT
static BOOL CFn_FitCharSet(HWND hDlg, int charset)
Definition: fontdlg.c:574
static BOOL CFn_HookCallChk32(const CHOOSEFONTW *lpcf)
Definition: fontdlg.c:291
static LRESULT CFn_WMDestroy(HWND hwnd, LPCHOOSEFONTW lpcfw)
Definition: fontdlg.c:1123
static INT AddFontFamily(const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW *lpNTM, UINT nFontType, const CHOOSEFONTW *lpcf, HWND hwnd, LPCFn_ENUMSTRUCT e)
Definition: fontdlg.c:303
#define FSTYLES
static const WCHAR *const sample_lang_text[]
Definition: fontdlg.c:67
#define TEXT_EXTRAS
Definition: fontdlg.c:277
static BOOL SetFontSizesToCombo3(HWND hwnd, const CHOOSEFONTW *lpcf)
Definition: fontdlg.c:431
#define CI(cs)
Definition: fontdlg.c:65
DWORD mask
Definition: fontdlg.c:120
static INT WINAPI FontStyleEnumProc(const ENUMLOGFONTEXW *lpElfex, const TEXTMETRICW *metrics, DWORD dwFontType, LPARAM lParam)
Definition: fontdlg.c:596
static LRESULT CFn_WMMeasureItem(HWND hDlg, LPARAM lParam)
Definition: fontdlg.c:751
static const COLORREF textcolors[TEXT_COLORS]
Definition: fontdlg.c:280
static const WCHAR strWineFontData[]
Definition: fontdlg.c:50
static int GetScreenDPI(void)
Definition: fontdlg.c:456
static const BYTE CHARSET_ORDER[256]
Definition: fontdlg.c:100
static BOOL AddFontSizeToCombo3(HWND hwnd, UINT h, const CHOOSEFONTW *lpcf)
Definition: fontdlg.c:408
static HIMAGELIST himlTT
Definition: fontdlg.c:54
#define TEXT_COLORS
Definition: fontdlg.c:278
static LRESULT CFn_WMPaint(HWND hDlg, WPARAM wParam, LPARAM lParam, const CHOOSEFONTW *lpcf)
Definition: fontdlg.c:1155
static void CFn_ReleaseDC(const CHOOSEFONTW *lpcf, HDC hdc)
Definition: fontdlg.c:471
static INT_PTR CALLBACK FormatCharDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: fontdlg.c:1261
static INT WINAPI FontFamilyEnumProc(const ENUMLOGFONTEXW *lpElfex, const TEXTMETRICW *metrics, DWORD dwFontType, LPARAM lParam)
Definition: fontdlg.c:343
#define CP_ACP
Definition: compat.h:109
#define TRACE_ON(x)
Definition: compat.h:75
#define CALLBACK
Definition: compat.h:35
#define lstrcpyW
Definition: compat.h:749
#define WideCharToMultiByte
Definition: compat.h:111
#define MultiByteToWideChar
Definition: compat.h:110
#define lstrcpynW
Definition: compat.h:738
#define lstrlenW
Definition: compat.h:750
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
Definition: res.c:176
HRSRC WINAPI FindResourceA(HMODULE hModule, LPCSTR name, LPCSTR type)
Definition: res.c:155
LPVOID WINAPI LockResource(HGLOBAL handle)
Definition: res.c:550
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:532
DWORD WINAPI FormatMessageW(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, __ms_va_list *args)
Definition: format_msg.c:583
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4171
_ACRTIMP __msvcrt_long __cdecl wcstol(const wchar_t *, wchar_t **, int)
Definition: wcs.c:2752
char * va_list
Definition: vadefs.h:50
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
#define swprintf
Definition: precomp.h:40
return ret
Definition: mutex.c:147
#define L(x)
Definition: resources.c:13
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
pKey DeleteObject()
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLdouble s
Definition: gl.h:2039
GLdouble n
Definition: glext.h:7729
GLuint res
Definition: glext.h:9613
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919
GLenum GLint GLuint mask
Definition: glext.h:6028
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
Definition: glext.h:11745
GLuint64EXT * result
Definition: glext.h:11304
GLenum GLsizei len
Definition: glext.h:6722
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
GLuint id
Definition: glext.h:5910
GLsizei const GLfloat * points
Definition: glext.h:8112
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
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
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 GLint GLint j
Definition: glfuncs.h:250
unsigned int UINT
Definition: sysinfo.c:13
#define cs
Definition: i386-dis.c:442
@ MAC
Definition: isohybrid.c:57
#define e
Definition: ke_i.h:82
#define debugstr_w
Definition: kernel32.h:32
LONG_PTR LPARAM
Definition: minwindef.h:175
LONG_PTR LRESULT
Definition: minwindef.h:176
UINT_PTR WPARAM
Definition: minwindef.h:174
CONST void * LPCVOID
Definition: minwindef.h:164
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:88
static HWND dialog
Definition: gui.c:33
static const struct @662 sizes[]
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
Definition: defwnd.c:16
#define LOWORD(l)
Definition: pedump.c:82
short WCHAR
Definition: pedump.c:58
#define RT_DIALOG
Definition: pedump.c:367
long LONG
Definition: pedump.c:60
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
#define ILD_TRANSPARENT
Definition: commctrl.h:418
#define CLR_DEFAULT
Definition: commctrl.h:320
#define WM_PAINT
Definition: winuser.h:1648
struct tagDRAWITEMSTRUCT * LPDRAWITEMSTRUCT
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define ODT_COMBOBOX
Definition: winuser.h:2575
DWORD WINAPI GetSysColor(_In_ int)
#define CB_SETITEMDATA
Definition: winuser.h:1995
#define MAKEWPARAM(l, h)
Definition: winuser.h:4117
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define ODS_SELECTED
Definition: winuser.h:2581
#define SW_HIDE
Definition: winuser.h:779
#define IMAGE_BITMAP
Definition: winuser.h:211
#define CB_GETLBTEXT
Definition: winuser.h:1981
#define EDGE_SUNKEN
Definition: winuser.h:451
INT_PTR WINAPI DialogBoxIndirectParamW(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
struct tagMEASUREITEMSTRUCT * LPMEASUREITEMSTRUCT
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
#define DT_CENTER
Definition: winuser.h:527
#define IDCANCEL
Definition: winuser.h:842
BOOL WINAPI GetWindowInfo(_In_ HWND, _Inout_ PWINDOWINFO)
#define COLOR_HIGHLIGHT
Definition: winuser.h:937
HBRUSH WINAPI GetSysColorBrush(_In_ int)
#define DT_SINGLELINE
Definition: winuser.h:540
#define WM_COMMAND
Definition: winuser.h:1768
#define CB_ERR
Definition: winuser.h:2471
#define CB_SETCURSEL
Definition: winuser.h:1990
#define BF_ADJUST
Definition: winuser.h:470
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define CB_RESETCONTENT
Definition: winuser.h:1988
#define CB_FINDSTRINGEXACT
Definition: winuser.h:1969
#define WM_INITDIALOG
Definition: winuser.h:1767
#define CB_GETCOUNT
Definition: winuser.h:1971
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2474
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define WM_GETFONT
Definition: winuser.h:1679
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDOK
Definition: winuser.h:841
#define WM_DRAWITEM
Definition: winuser.h:1673
#define CBN_SELCHANGE
Definition: winuser.h:2008
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
BOOL WINAPI SetDlgItemInt(_In_ HWND, _In_ int, _In_ UINT, _In_ BOOL)
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
#define CB_ADDSTRING
Definition: winuser.h:1965
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
#define CB_GETITEMDATA
Definition: winuser.h:1979
UINT WINAPI RegisterWindowMessageW(_In_ LPCWSTR)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define COLOR_HIGHLIGHTTEXT
Definition: winuser.h:938
HDC WINAPI GetDC(_In_opt_ HWND)
#define MB_OK
Definition: winuser.h:801
#define WM_MEASUREITEM
Definition: winuser.h:1674
#define CB_SETEDITSEL
Definition: winuser.h:1992
INT_PTR WINAPI DialogBoxIndirectParamA(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
#define DT_VCENTER
Definition: winuser.h:543
HWND WINAPI GetParent(_In_ HWND)
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
#define MB_ICONINFORMATION
Definition: winuser.h:813
#define CB_LIMITTEXT
Definition: winuser.h:1987
#define IDC_WAIT
Definition: winuser.h:697
#define BN_CLICKED
Definition: winuser.h:1954
#define WM_DESTROY
Definition: winuser.h:1637
#define CB_FINDSTRING
Definition: winuser.h:1968
BOOL WINAPI DrawFocusRect(_In_ HDC, _In_ LPCRECT)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define CB_INSERTSTRING
Definition: winuser.h:1986
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:3014
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
#define CB_GETCURSEL
Definition: winuser.h:1972
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define BF_RECT
Definition: winuser.h:462
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define CBN_EDITCHANGE
Definition: winuser.h:2004
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
const WCHAR * str
#define LoadStringW
Definition: utils.h:64
weight
Definition: sortkey.c:157
#define TRACE(s)
Definition: solgame.cpp:4
HWND hWnd1
Definition: fontdlg.c:43
HWND hWnd2
Definition: fontdlg.c:44
LPCHOOSEFONTW lpcf32w
Definition: fontdlg.c:45
CHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:55
BYTE lfOutPrecision
Definition: dimm.idl:68
BYTE lfStrikeOut
Definition: dimm.idl:66
BYTE lfItalic
Definition: dimm.idl:64
LONG lfHeight
Definition: dimm.idl:59
LONG lfWeight
Definition: dimm.idl:63
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
LONG lfOrientation
Definition: dimm.idl:62
LONG lfWidth
Definition: dimm.idl:60
BYTE lfUnderline
Definition: dimm.idl:65
BYTE lfClipPrecision
Definition: dimm.idl:69
LONG lfEscapement
Definition: dimm.idl:61
BYTE lfCharSet
Definition: dimm.idl:67
BYTE lfQuality
Definition: dimm.idl:70
BYTE lfPitchAndFamily
Definition: dimm.idl:71
Definition: dcommon.idl:28
long bottom
Definition: dcommon.idl:29
long right
Definition: dcommon.idl:29
long left
Definition: dcommon.idl:29
long top
Definition: dcommon.idl:29
Definition: match.c:390
Definition: name.c:39
LPCSTR lpTemplateName
Definition: commdlg.h:270
HINSTANCE hInstance
Definition: commdlg.h:271
LPCFHOOKPROC lpfnHook
Definition: commdlg.h:269
LPLOGFONTA lpLogFont
Definition: commdlg.h:264
LPSTR lpszStyle
Definition: commdlg.h:272
HWND hwndOwner
Definition: commdlg.h:262
DWORD Flags
Definition: commdlg.h:266
HINSTANCE hInstance
Definition: commdlg.h:289
LPWSTR lpszStyle
Definition: commdlg.h:290
DWORD Flags
Definition: commdlg.h:284
INT iPointSize
Definition: commdlg.h:283
LPLOGFONTW lpLogFont
Definition: commdlg.h:282
LPCFHOOKPROC lpfnHook
Definition: commdlg.h:287
DWORD lStructSize
Definition: commdlg.h:279
HWND hwndOwner
Definition: commdlg.h:280
LPCWSTR lpTemplateName
Definition: commdlg.h:288
WORD nFontType
Definition: commdlg.h:291
DWORD rgbColors
Definition: commdlg.h:285
LOGFONTW elfLogFont
Definition: wingdi.h:3148
WCHAR elfScript[LF_FACESIZE]
Definition: wingdi.h:3151
CHAR lfFaceName[LF_FACESIZE]
Definition: wingdi.h:2340
BYTE lfOutPrecision
Definition: dwrite.idl:1130
LONG lfWidth
Definition: dwrite.idl:1122
BYTE lfCharSet
Definition: dwrite.idl:1129
BYTE lfQuality
Definition: dwrite.idl:1132
BYTE lfUnderline
Definition: dwrite.idl:1127
LONG lfOrientation
Definition: dwrite.idl:1124
LONG lfHeight
Definition: dwrite.idl:1121
WCHAR lfFaceName[LF_FACESIZE]
Definition: dwrite.idl:1134
BYTE lfItalic
Definition: dwrite.idl:1126
BYTE lfStrikeOut
Definition: dwrite.idl:1128
LONG lfWeight
Definition: dwrite.idl:1125
BYTE lfClipPrecision
Definition: dwrite.idl:1131
LONG lfEscapement
Definition: dwrite.idl:1123
BYTE lfPitchAndFamily
Definition: dwrite.idl:1133
NEWTEXTMETRICW ntmTm
Definition: wingdi.h:3121
LONG tmInternalLeading
Definition: wingdi.h:3093
DWORD cbSize
Definition: winuser.h:3874
RECT rcWindow
Definition: winuser.h:3875
int32_t INT_PTR
Definition: typedefs.h:64
uint32_t DWORD_PTR
Definition: typedefs.h:65
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
uint16_t * LPWSTR
Definition: typedefs.h:56
char * LPSTR
Definition: typedefs.h:51
int32_t INT
Definition: typedefs.h:58
#define MAKELONG(a, b)
Definition: typedefs.h:249
#define HIWORD(l)
Definition: typedefs.h:247
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
Definition: dialog.c:2283
#define FORMAT_MESSAGE_FROM_STRING
Definition: winbase.h:398
#define FORMAT_MESSAGE_ARGUMENT_ARRAY
Definition: winbase.h:401
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
DWORD COLORREF
Definition: windef.h:100
HICON HCURSOR
Definition: windef.h:99
#define WINAPI
Definition: msvc.h:6
#define FIXED_PITCH
Definition: wingdi.h:444
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
Definition: text.c:221
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
Definition: dc.c:999
#define LTGRAY_BRUSH
Definition: wingdi.h:900
#define DEVICE_FONTTYPE
Definition: wingdi.h:1108
int WINAPI EnumFontFamiliesExW(_In_ HDC, _In_ PLOGFONTW, _In_ FONTENUMPROCW, _In_ LPARAM, _In_ DWORD)
#define DEFAULT_QUALITY
Definition: wingdi.h:436
#define FW_BOLD
Definition: wingdi.h:378
#define TRUETYPE_FONTTYPE
Definition: wingdi.h:1109
#define LOGPIXELSY
Definition: wingdi.h:719
FARPROC FONTENUMPROCW
Definition: wingdi.h:3343
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1546
#define DEFAULT_CHARSET
Definition: wingdi.h:384
#define TRANSPARENT
Definition: wingdi.h:950
#define RASTER_FONTTYPE
Definition: wingdi.h:1107
#define OUT_DEFAULT_PRECIS
Definition: wingdi.h:415
#define ANSI_CHARSET
Definition: wingdi.h:383
#define CLIP_DEFAULT_PRECIS
Definition: wingdi.h:426
#define NTM_TT_OPENTYPE
Definition: wingdi.h:27
#define FW_NORMAL
Definition: wingdi.h:373
#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)
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
int WINAPI SetBkMode(_In_ HDC, _In_ int)
Definition: dc.c:1056
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
Definition: text.c:917
#define NTM_TYPE1
Definition: wingdi.h:29
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
#define FW_MEDIUM
Definition: wingdi.h:375
static int init
Definition: wintirpc.c:33
unsigned char BYTE
Definition: xxhash.c:193