ReactOS  0.4.14-dev-49-gfb4591c
fontdlg.c File Reference
#include <ctype.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "wingdi.h"
#include "winuser.h"
#include "commdlg.h"
#include "dlgs.h"
#include "wine/debug.h"
#include "wine/heap.h"
#include "wine/unicode.h"
#include "cderr.h"
#include "cdlg.h"
Include dependency graph for fontdlg.c:

Go to the source code of this file.

Classes

struct  CFn_ENUMSTRUCT
 

Macros

#define TTBITMAP_XSIZE   20 /* x-size of the bitmaps */
 
#define CI(cs)   ((IDS_CHARSET_##cs)-IDS_CHARSET_ANSI)
 
#define XX(x)   { x, #x },
 
#define TEXT_EXTRAS   4
 
#define TEXT_COLORS   16
 
#define FSTYLES   4
 

Typedefs

typedef struct CFn_ENUMSTRUCTLPCFn_ENUMSTRUCT
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (commdlg)
 
static INT_PTR CALLBACK FormatCharDlgProcA (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static INT_PTR CALLBACK FormatCharDlgProcW (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static void _dump_cf_flags (DWORD cflags)
 
BOOL WINAPI ChooseFontW (LPCHOOSEFONTW lpChFont)
 
BOOL WINAPI ChooseFontA (LPCHOOSEFONTA lpChFont)
 
static BOOL CFn_HookCallChk32 (const CHOOSEFONTW *lpcf)
 
static INT AddFontFamily (const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW *lpNTM, UINT nFontType, const CHOOSEFONTW *lpcf, HWND hwnd, LPCFn_ENUMSTRUCT e)
 
static INT WINAPI FontFamilyEnumProc (const ENUMLOGFONTEXW *lpElfex, const TEXTMETRICW *metrics, DWORD dwFontType, LPARAM lParam)
 
static BOOL SetFontStylesToCombo2 (HWND hwnd, HDC hdc, const LOGFONTW *lplf)
 
static BOOL AddFontSizeToCombo3 (HWND hwnd, UINT h, const CHOOSEFONTW *lpcf)
 
static BOOL SetFontSizesToCombo3 (HWND hwnd, const CHOOSEFONTW *lpcf)
 
static HDC CFn_GetDC (const CHOOSEFONTW *lpcf)
 
static int GetScreenDPI (void)
 
static void CFn_ReleaseDC (const CHOOSEFONTW *lpcf, HDC hdc)
 
static void select_combo_item (HWND dialog, int id, int sel)
 
static INT AddFontStyle (const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW *lpNTM, UINT nFontType, const CHOOSEFONTW *lpcf, HWND hcmb2, HWND hcmb3, HWND hDlg)
 
static void CFn_FitFontSize (HWND hDlg, int points)
 
static BOOL CFn_FitFontStyle (HWND hDlg, LONG packedstyle)
 
static BOOL CFn_FitCharSet (HWND hDlg, int charset)
 
static INT WINAPI FontStyleEnumProc (const ENUMLOGFONTEXW *lpElfex, const TEXTMETRICW *metrics, DWORD dwFontType, LPARAM lParam)
 
static LRESULT CFn_WMInitDialog (HWND hDlg, LPARAM lParam, LPCHOOSEFONTW lpcf)
 
static LRESULT CFn_WMMeasureItem (HWND hDlg, LPARAM lParam)
 
static LRESULT CFn_WMDrawItem (LPARAM lParam)
 
static INT get_dialog_font_point_size (HWND hDlg, CHOOSEFONTW *cf)
 
static LRESULT CFn_WMCommand (HWND hDlg, WPARAM wParam, LPARAM lParam, LPCHOOSEFONTW lpcf)
 
static LRESULT CFn_WMDestroy (HWND hwnd, LPCHOOSEFONTW lpcfw)
 
static LRESULT CFn_WMPaint (HWND hDlg, WPARAM wParam, LPARAM lParam, const CHOOSEFONTW *lpcf)
 

Variables

static const WCHAR strWineFontData [] = {'_','_','W','I','N','E','_','F','O','N','T','D','L','G','D','A','T','A',0}
 
static const WCHAR strWineFontData_a []
 
static const WCHAR chooseFontW [] = {'C','H','O','O','S','E','_','F','O','N','T',0}
 
static const WCHAR fontsizefmtW [] = {'%','d',0}
 
static HIMAGELIST himlTT = 0
 
static const WCHAR stWestern [] ={'A','a','B','b','Y','y','Z','z',0}
 
static const WCHAR stSymbol [] ={'S','y','m','b','o','l',0}
 
static const WCHAR stShiftJis [] ={'A','a',0x3042,0x3041,0x30a2,0x30a1,0x4e9c,0x5b87,0}
 
static const WCHAR stHangul [] ={0xac00,0xb098,0xb2e4,'A','a','B','Y','y','Z','z',0}
 
static const WCHAR stGB2312 [] ={0x5fae,0x8f6f,0x4e2d,0x6587,0x8f6f,0x4ef6,0}
 
static const WCHAR stBIG5 [] ={0x4e2d,0x6587,0x5b57,0x578b,0x7bc4,0x4f8b,0}
 
static const WCHAR stGreek [] ={'A','a','B','b',0x0391,0x03b1,0x0392,0x03b2,0}
 
static const WCHAR stTurkish [] ={'A','a','B','b',0x011e,0x011f,0x015e,0x015f,0}
 
static const WCHAR stHebrew [] ={'A','a','B','b',0x05e0,0x05e1,0x05e9,0x05ea,0}
 
static const WCHAR stArabic [] ={'A','a','B','b',0x0627,0x0628,0x062c,0x062f,0x0647,0x0648,0x0632,0}
 
static const WCHAR stBaltic [] ={'A','a','B','b','Y','y','Z','z',0}
 
static const WCHAR stVietname [] ={'A','a','B','b',0x01a0,0x01a1,0x01af,0x01b0,0}
 
static const WCHAR stCyrillic [] ={'A','a','B','b',0x0411,0x0431,0x0424,0x0444,0}
 
static const WCHAR stEastEur [] ={'A','a','B','b',0xc1,0xe1,0xd4,0xf4,0}
 
static const WCHAR stThai [] ={'A','a','B','b',0x0e2d,0x0e31,0x0e01,0x0e29,0x0e23,0x0e44,0x0e17,0x0e22,0}
 
static const WCHAR stJohab [] ={0xac00,0xb098,0xb2e4,'A','a','B','Y','y','Z','z',0}
 
static const WCHAR stMac [] ={'A','a','B','b','Y','y','Z','z',0}
 
static const WCHAR stOEM [] ={'A','a','B','b',0xf8,0xf1,0xfd,0}
 
static const WCHAR stVISCII [] ={'A','a','B','b',0}
 
static const WCHAR stTCVN [] ={'A','a','B','b',0}
 
static const WCHAR stKOI8 [] ={'A','a','B','b',0}
 
static const WCHAR stIso88593 [] ={'A','a','B','b',0}
 
static const WCHAR stIso88594 [] ={'A','a','B','b',0}
 
static const WCHAR stIso885910 [] ={'A','a','B','b',0}
 
static const WCHAR stCeltic [] ={'A','a','B','b',0}
 
static const WCHAR *const sample_lang_text []
 
static const BYTE CHARSET_ORDER [256]
 
struct {
   DWORD   mask
 
   const char *   name
 
cfflags []
 
static const COLORREF textcolors [TEXT_COLORS]
 

Macro Definition Documentation

◆ CI

#define CI (   cs)    ((IDS_CHARSET_##cs)-IDS_CHARSET_ANSI)

Definition at line 69 of file fontdlg.c.

◆ FSTYLES

#define FSTYLES   4

◆ TEXT_COLORS

#define TEXT_COLORS   16

Definition at line 288 of file fontdlg.c.

◆ TEXT_EXTRAS

#define TEXT_EXTRAS   4

Definition at line 287 of file fontdlg.c.

◆ TTBITMAP_XSIZE

#define TTBITMAP_XSIZE   20 /* x-size of the bitmaps */

Definition at line 59 of file fontdlg.c.

◆ XX

#define XX (   x)    { x, #x },

Typedef Documentation

◆ LPCFn_ENUMSTRUCT

Function Documentation

◆ _dump_cf_flags()

static void _dump_cf_flags ( DWORD  cflags)
static

Definition at line 162 of file fontdlg.c.

163 {
164  unsigned int i;
165 
166  for (i = 0; i < ARRAY_SIZE(cfflags); i++)
167  if (cfflags[i].mask & cflags)
168  TRACE("%s|",cfflags[i].name);
169  TRACE("\n");
170 }
static const struct @331 cfflags[]
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
GLenum GLint GLuint mask
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define ARRAY_SIZE(a)
Definition: main.h:24
Definition: name.c:36

Referenced by ChooseFontA(), and ChooseFontW().

◆ AddFontFamily()

static INT AddFontFamily ( const ENUMLOGFONTEXW lpElfex,
const NEWTEXTMETRICEXW lpNTM,
UINT  nFontType,
const CHOOSEFONTW lpcf,
HWND  hwnd,
LPCFn_ENUMSTRUCT  e 
)
static

Definition at line 313 of file fontdlg.c.

315 {
316  int i;
317  WORD w;
318  const LOGFONTW *lplf = &(lpElfex->elfLogFont);
319 
320  TRACE("font=%s (nFontType=%d)\n", debugstr_w(lplf->lfFaceName), nFontType);
321 
322  if (lpcf->Flags & CF_FIXEDPITCHONLY)
323  if (!(lplf->lfPitchAndFamily & FIXED_PITCH))
324  return 1;
325  if (lpcf->Flags & CF_ANSIONLY)
326  if (lplf->lfCharSet != ANSI_CHARSET)
327  return 1;
328  if (lpcf->Flags & CF_TTONLY)
329  if (!(nFontType & TRUETYPE_FONTTYPE))
330  return 1;
331  if (lpcf->Flags & CF_NOVERTFONTS)
332  if (lplf->lfFaceName[0] == '@')
333  return 1;
334 
335  if (e) e->added++;
336 
338  if (i == CB_ERR) {
340  if( i != CB_ERR) {
341  /* store some important font information */
342  w = (lplf->lfPitchAndFamily) << 8 |
343  (HIWORD(lpNTM->ntmTm.ntmFlags) & 0xff);
344  SendMessageW(hwnd, CB_SETITEMDATA, i, MAKELONG(nFontType,w));
345  }
346  }
347  return 1;
348 }
#define CF_TTONLY
Definition: commdlg.h:80
#define CB_SETITEMDATA
Definition: winuser.h:1948
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
BYTE lfPitchAndFamily
Definition: dimm.idl:71
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
#define CF_FIXEDPITCHONLY
Definition: commdlg.h:76
BYTE lfCharSet
Definition: dimm.idl:67
NEWTEXTMETRICW ntmTm
Definition: wingdi.h:2670
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
#define CF_ANSIONLY
Definition: commdlg.h:70
#define e
Definition: ke_i.h:82
#define FIXED_PITCH
Definition: wingdi.h:443
#define debugstr_w
Definition: kernel32.h:32
#define CB_ADDSTRING
Definition: winuser.h:1918
#define MAKELONG(a, b)
Definition: typedefs.h:248
LONG_PTR LPARAM
Definition: windef.h:208
#define CB_ERR
Definition: winuser.h:2410
#define TRACE(s)
Definition: solgame.cpp:4
unsigned short WORD
Definition: ntddk_ex.h:93
DWORD Flags
Definition: commdlg.h:284
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LOGFONTW elfLogFont
Definition: wingdi.h:2697
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
#define HIWORD(l)
Definition: typedefs.h:246
#define ANSI_CHARSET
Definition: wingdi.h:382
#define CF_NOVERTFONTS
Definition: commdlg.h:86
#define TRUETYPE_FONTTYPE
Definition: wingdi.h:1108
#define CB_FINDSTRINGEXACT
Definition: winuser.h:1922

Referenced by FontFamilyEnumProc().

◆ AddFontSizeToCombo3()

static BOOL AddFontSizeToCombo3 ( HWND  hwnd,
UINT  h,
const CHOOSEFONTW lpcf 
)
static

Definition at line 418 of file fontdlg.c.

419 {
420  int j;
421  WCHAR buffer[20];
422 
423  if ( (!(lpcf->Flags & CF_LIMITSIZE)) ||
424  ((lpcf->Flags & CF_LIMITSIZE) && (h >= lpcf->nSizeMin) && (h <= lpcf->nSizeMax)))
425  {
428  if (j==CB_ERR)
429  {
431  if (j!=CB_ERR) j = SendMessageW(hwnd, CB_SETITEMDATA, j, h);
432  if (j==CB_ERR) return TRUE;
433  }
434  }
435  return FALSE;
436 }
#define CB_SETITEMDATA
Definition: winuser.h:1948
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TRUE
Definition: types.h:120
GLuint buffer
Definition: glext.h:5915
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
#define CF_LIMITSIZE
Definition: commdlg.h:75
#define CB_INSERTSTRING
Definition: winuser.h:1939
LONG_PTR LPARAM
Definition: windef.h:208
#define CB_ERR
Definition: winuser.h:2410
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
static const WCHAR fontsizefmtW[]
Definition: fontdlg.c:55
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORD Flags
Definition: commdlg.h:284
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define sprintfW
Definition: unicode.h:58
#define CB_FINDSTRINGEXACT
Definition: winuser.h:1922

Referenced by AddFontStyle(), and SetFontSizesToCombo3().

◆ AddFontStyle()

static INT AddFontStyle ( const ENUMLOGFONTEXW lpElfex,
const NEWTEXTMETRICEXW lpNTM,
UINT  nFontType,
const CHOOSEFONTW lpcf,
HWND  hcmb2,
HWND  hcmb3,
HWND  hDlg 
)
static

Definition at line 500 of file fontdlg.c.

502 {
503  int i;
504  const LOGFONTW *lplf = &(lpElfex->elfLogFont);
505  HWND hcmb5;
506  HDC hdc;
507 
508  TRACE("(nFontType=%d)\n",nFontType);
509  TRACE(" %s h=%d w=%d e=%d o=%d wg=%d i=%d u=%d s=%d"
510  " ch=%d op=%d cp=%d q=%d pf=%xh\n",
511  debugstr_w(lplf->lfFaceName),lplf->lfHeight,lplf->lfWidth,
512  lplf->lfEscapement,lplf->lfOrientation,
513  lplf->lfWeight,lplf->lfItalic,lplf->lfUnderline,
514  lplf->lfStrikeOut,lplf->lfCharSet, lplf->lfOutPrecision,
515  lplf->lfClipPrecision,lplf->lfQuality, lplf->lfPitchAndFamily);
516  if (nFontType & RASTER_FONTTYPE)
517  {
518  INT points;
519  points = MulDiv( lpNTM->ntmTm.tmHeight - lpNTM->ntmTm.tmInternalLeading,
520  72, GetScreenDPI());
521  if (AddFontSizeToCombo3(hcmb3, points, lpcf))
522  return 0;
523  } else if (SetFontSizesToCombo3(hcmb3, lpcf)) return 0;
524 
525  if (!SendMessageW(hcmb2, CB_GETCOUNT, 0, 0))
526  {
527  BOOL res;
528  if(!(hdc = CFn_GetDC(lpcf))) return 0;
529  res = SetFontStylesToCombo2(hcmb2,hdc,lplf);
530  CFn_ReleaseDC(lpcf, hdc);
531  if (res)
532  return 0;
533  }
534  if (!( hcmb5 = GetDlgItem(hDlg, cmb5))) return 1;
535  i = SendMessageW( hcmb5, CB_FINDSTRINGEXACT, 0,
536  (LPARAM)lpElfex->elfScript);
537  if( i == CB_ERR) {
538  i = SendMessageW( hcmb5, CB_ADDSTRING, 0,
539  (LPARAM)lpElfex->elfScript);
540  if( i != CB_ERR)
541  SendMessageW( hcmb5, CB_SETITEMDATA, i, lplf->lfCharSet);
542  }
543  return 1 ;
544 }
#define CB_SETITEMDATA
Definition: winuser.h:1948
BYTE lfPitchAndFamily
Definition: dimm.idl:71
LONG lfHeight
Definition: dimm.idl:59
BYTE lfCharSet
Definition: dimm.idl:67
BYTE lfClipPrecision
Definition: dimm.idl:69
static HDC
Definition: imagelist.c:92
#define cmb5
Definition: dlgs.h:52
LONG lfEscapement
Definition: dimm.idl:61
static BOOL AddFontSizeToCombo3(HWND hwnd, UINT h, const CHOOSEFONTW *lpcf)
Definition: fontdlg.c:418
int32_t INT
Definition: typedefs.h:56
NEWTEXTMETRICW ntmTm
Definition: wingdi.h:2670
static HDC CFn_GetDC(const CHOOSEFONTW *lpcf)
Definition: fontdlg.c:454
static BOOL SetFontSizesToCombo3(HWND hwnd, const CHOOSEFONTW *lpcf)
Definition: fontdlg.c:441
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
unsigned int BOOL
Definition: ntddk_ex.h:94
LONG lfOrientation
Definition: dimm.idl:62
#define debugstr_w
Definition: kernel32.h:32
#define CB_ADDSTRING
Definition: winuser.h:1918
WCHAR elfScript[LF_FACESIZE]
Definition: wingdi.h:2700
LONG lfWidth
Definition: dimm.idl:60
LONG_PTR LPARAM
Definition: windef.h:208
#define CB_ERR
Definition: winuser.h:2410
BYTE lfOutPrecision
Definition: dimm.idl:68
#define TRACE(s)
Definition: solgame.cpp:4
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
GLsizei const GLfloat * points
Definition: glext.h:8112
#define RASTER_FONTTYPE
Definition: wingdi.h:1106
BYTE lfQuality
Definition: dimm.idl:70
HDC hdc
Definition: main.c:9
LONG tmInternalLeading
Definition: wingdi.h:2642
static BOOL SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTW *lplf)
Definition: fontdlg.c:367
BYTE lfStrikeOut
Definition: dimm.idl:66
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BYTE lfItalic
Definition: dimm.idl:64
static void CFn_ReleaseDC(const CHOOSEFONTW *lpcf, HDC hdc)
Definition: fontdlg.c:481
GLuint res
Definition: glext.h:9613
LOGFONTW elfLogFont
Definition: wingdi.h:2697
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
#define CB_GETCOUNT
Definition: winuser.h:1924
LONG lfWeight
Definition: dimm.idl:63
BYTE lfUnderline
Definition: dimm.idl:65
#define MulDiv(x, y, z)
Definition: gdifloat.h:86
static int GetScreenDPI(void)
Definition: fontdlg.c:466
#define CB_FINDSTRINGEXACT
Definition: winuser.h:1922

Referenced by FontStyleEnumProc().

◆ CFn_FitCharSet()

static BOOL CFn_FitCharSet ( HWND  hDlg,
int  charset 
)
static

Definition at line 584 of file fontdlg.c.

585 {
586  int i,n,cs;
587  /* look for fitting char set in combobox5 */
588  n=SendDlgItemMessageW(hDlg, cmb5, CB_GETCOUNT, 0, 0);
589  for (i=0;i<n;i++)
590  {
592  if (charset == cs)
593  {
594  select_combo_item( hDlg, cmb5, i );
595  return TRUE;
596  }
597  }
598  /* no charset fits: select the first one in the list */
599  select_combo_item( hDlg, cmb5, 0 );
600  return FALSE;
601 }
#define TRUE
Definition: types.h:120
CFF_Charset charset
Definition: cffcmap.c:138
#define CB_GETITEMDATA
Definition: winuser.h:1932
GLdouble n
Definition: glext.h:7729
#define cmb5
Definition: dlgs.h:52
static void select_combo_item(HWND dialog, int id, int sel)
Definition: fontdlg.c:490
uint32_t cs
Definition: isohybrid.c:75
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
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define CB_GETCOUNT
Definition: winuser.h:1924

Referenced by CFn_WMCommand(), and CFn_WMInitDialog().

◆ CFn_FitFontSize()

static void CFn_FitFontSize ( HWND  hDlg,
int  points 
)
static

Definition at line 546 of file fontdlg.c.

547 {
548  int i,n;
549 
550  /* look for fitting font size in combobox3 */
551  n=SendDlgItemMessageW(hDlg, cmb3, CB_GETCOUNT, 0, 0);
552  for (i=0;i<n;i++)
553  {
554  if (points == (int)SendDlgItemMessageW
555  (hDlg,cmb3, CB_GETITEMDATA,i,0))
556  {
557  select_combo_item( hDlg, cmb3, i );
558  return;
559  }
560  }
561 
562  /* no default matching size, set text manually */
563  SetDlgItemInt(hDlg, cmb3, points, TRUE);
564 }
#define TRUE
Definition: types.h:120
#define CB_GETITEMDATA
Definition: winuser.h:1932
GLdouble n
Definition: glext.h:7729
static void select_combo_item(HWND dialog, int id, int sel)
Definition: fontdlg.c:490
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
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLsizei const GLfloat * points
Definition: glext.h:8112
BOOL WINAPI SetDlgItemInt(_In_ HWND, _In_ int, _In_ UINT, _In_ BOOL)
#define cmb3
Definition: dlgs.h:50
#define CB_GETCOUNT
Definition: winuser.h:1924

Referenced by CFn_WMCommand(), and CFn_WMInitDialog().

◆ CFn_FitFontStyle()

static BOOL CFn_FitFontStyle ( HWND  hDlg,
LONG  packedstyle 
)
static

Definition at line 566 of file fontdlg.c.

567 {
568  LONG id;
569  int i;
570  /* look for fitting font style in combobox2 */
571  for (i=0;i<TEXT_EXTRAS;i++)
572  {
573  id = SendDlgItemMessageW(hDlg, cmb2, CB_GETITEMDATA, i, 0);
574  if (packedstyle == id)
575  {
576  select_combo_item( hDlg, cmb2, i );
577  return TRUE;
578  }
579  }
580  return FALSE;
581 }
#define TRUE
Definition: types.h:120
#define CB_GETITEMDATA
Definition: winuser.h:1932
static void select_combo_item(HWND dialog, int id, int sel)
Definition: fontdlg.c:490
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
long LONG
Definition: pedump.c:60
#define TEXT_EXTRAS
Definition: fontdlg.c:287
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define cmb2
Definition: dlgs.h:49
GLenum GLuint id
Definition: glext.h:5579

Referenced by CFn_WMCommand(), and CFn_WMInitDialog().

◆ CFn_GetDC()

static HDC CFn_GetDC ( const CHOOSEFONTW lpcf)
inlinestatic

Definition at line 454 of file fontdlg.c.

455 {
456  HDC ret = ((lpcf->Flags & CF_PRINTERFONTS) && lpcf->hDC) ?
457  lpcf->hDC :
458  GetDC(0);
459  if(!ret) ERR("HDC failure!!!\n");
460  return ret;
461 }
HDC WINAPI GetDC(_In_opt_ HWND)
static HDC
Definition: imagelist.c:92
DWORD Flags
Definition: commdlg.h:284
int ret
#define CF_PRINTERFONTS
Definition: commdlg.h:60
#define ERR(fmt,...)
Definition: debug.h:109

Referenced by AddFontStyle(), CFn_WMCommand(), and CFn_WMInitDialog().

◆ CFn_HookCallChk32()

static BOOL CFn_HookCallChk32 ( const CHOOSEFONTW lpcf)
static

Definition at line 301 of file fontdlg.c.

302 {
303  if (lpcf)
304  if(lpcf->Flags & CF_ENABLEHOOK)
305  if (lpcf->lpfnHook)
306  return TRUE;
307  return FALSE;
308 }
#define TRUE
Definition: types.h:120
#define CF_ENABLEHOOK
Definition: commdlg.h:63
DWORD Flags
Definition: commdlg.h:284
LPCFHOOKPROC lpfnHook
Definition: commdlg.h:287

Referenced by FormatCharDlgProcA(), and FormatCharDlgProcW().

◆ CFn_ReleaseDC()

static void CFn_ReleaseDC ( const CHOOSEFONTW lpcf,
HDC  hdc 
)
inlinestatic

Definition at line 481 of file fontdlg.c.

482 {
483  if(!((lpcf->Flags & CF_PRINTERFONTS) && lpcf->hDC))
484  ReleaseDC(0, hdc);
485 }
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
DWORD Flags
Definition: commdlg.h:284
#define CF_PRINTERFONTS
Definition: commdlg.h:60
HDC hdc
Definition: main.c:9

Referenced by AddFontStyle(), CFn_WMCommand(), and CFn_WMInitDialog().

◆ CFn_WMCommand()

static LRESULT CFn_WMCommand ( HWND  hDlg,
WPARAM  wParam,
LPARAM  lParam,
LPCHOOSEFONTW  lpcf 
)
static

Definition at line 923 of file fontdlg.c.

924 {
925  int i;
926  long l;
927  HDC hdc;
928  BOOL cmb_selected_by_edit = FALSE;
929 
930  if (!lpcf) return FALSE;
931 
933  {
934  int idx;
935  WCHAR str_edit[256], str_cmb[256];
936  int cmb = LOWORD(wParam);
937 
938  GetDlgItemTextW(hDlg, cmb, str_edit, ARRAY_SIZE(str_edit));
939  idx = SendDlgItemMessageW(hDlg, cmb, CB_FINDSTRING, -1, (LPARAM)str_edit);
940  if(idx != -1)
941  {
942  SendDlgItemMessageW(hDlg, cmb, CB_GETLBTEXT, idx, (LPARAM)str_cmb);
943 
944  /* Select listbox entry only if we have an exact match */
945  if(lstrcmpiW(str_edit, str_cmb) == 0)
946  {
947  SendDlgItemMessageW(hDlg, cmb, CB_SETCURSEL, idx, 0);
948  SendDlgItemMessageW(hDlg, cmb, CB_SETEDITSEL, 0, -1); /* Remove edit field selection */
949  cmb_selected_by_edit = TRUE;
950  }
951  }
952  }
953 
954  TRACE("WM_COMMAND wParam=%08X lParam=%08lX\n", (LONG)wParam, lParam);
955  switch (LOWORD(wParam))
956  {
957  case cmb1:
958  if (HIWORD(wParam) == CBN_SELCHANGE || cmb_selected_by_edit)
959  {
960  INT pointsize; /* save current pointsize */
961  LONG pstyle; /* save current style */
962  int charset;
963  int idx;
964  if(!(hdc = CFn_GetDC(lpcf)))
965  {
966  EndDialog (hDlg, 0);
967  return TRUE;
968  }
969  idx = SendDlgItemMessageW(hDlg, cmb3, CB_GETCURSEL, 0, 0);
970  pointsize = (int)SendDlgItemMessageW( hDlg, cmb3, CB_GETITEMDATA,
971  idx, 0);
972  idx = SendDlgItemMessageW(hDlg, cmb2, CB_GETCURSEL, 0, 0);
973  pstyle = SendDlgItemMessageW(hDlg, cmb2, CB_GETITEMDATA, idx, 0);
974  idx = SendDlgItemMessageW(hDlg, cmb5, CB_GETCURSEL, 0, 0);
976 
980  i=SendDlgItemMessageW(hDlg, cmb1, CB_GETCURSEL, 0, 0);
981  if (i!=CB_ERR)
982  {
985  LOGFONTW enumlf;
987  (LPARAM)enumlf.lfFaceName);
988  TRACE("WM_COMMAND/cmb1 =>%s\n", debugstr_w(enumlf.lfFaceName));
989  s.hWnd1=GetDlgItem(hDlg, cmb2);
990  s.hWnd2=GetDlgItem(hDlg, cmb3);
991  s.lpcf32w=lpcf;
992  enumlf.lfCharSet = DEFAULT_CHARSET; /* enum all charsets */
993  enumlf.lfPitchAndFamily = 0;
994  EnumFontFamiliesExW(hdc, &enumlf,
996  CFn_FitFontStyle(hDlg, pstyle);
997  if( pointsize != CB_ERR) CFn_FitFontSize(hDlg, pointsize);
998  if( charset != CB_ERR) CFn_FitCharSet( hDlg, charset );
999  SetCursor(hcursor);
1000  }
1001  CFn_ReleaseDC(lpcf, hdc);
1002  }
1003  break;
1004  case chx1:
1005  case chx2:
1006  case cmb2:
1007  case cmb3:
1008  case cmb5:
1009  if (HIWORD(wParam) == CBN_SELCHANGE || HIWORD(wParam) == BN_CLICKED || cmb_selected_by_edit)
1010  {
1011  WCHAR str[256];
1012  WINDOWINFO wininfo;
1013  LPLOGFONTW lpxx=lpcf->lpLogFont;
1014 
1015  TRACE("WM_COMMAND/cmb2,3 =%08lX\n", lParam);
1016 
1017  /* face name */
1019  if (i==CB_ERR)
1020  GetDlgItemTextW( hDlg, cmb1, str, ARRAY_SIZE(str));
1021  else
1022  {
1024  (LPARAM)str);
1026  lpcf->nFontType = LOWORD(l);
1027  /* FIXME: lpcf->nFontType |= .... SIMULATED_FONTTYPE and so */
1028  /* same value reported to the EnumFonts
1029  call back with the extra FONTTYPE_... bits added */
1030  lpxx->lfPitchAndFamily = HIWORD(l) >> 8;
1031  }
1032  lstrcpynW(lpxx->lfFaceName, str, ARRAY_SIZE(lpxx->lfFaceName));
1033 
1034  /* style */
1035  i=SendDlgItemMessageW(hDlg, cmb2, CB_GETCURSEL, 0, 0);
1036  if (i!=CB_ERR)
1037  {
1039  if (0!=(lpxx->lfItalic=HIWORD(l)))
1040  lpcf->nFontType |= ITALIC_FONTTYPE;
1041  if ((lpxx->lfWeight=LOWORD(l)) > FW_MEDIUM)
1042  lpcf->nFontType |= BOLD_FONTTYPE;
1043  }
1044 
1045  /* size */
1046  get_dialog_font_point_size(hDlg, lpcf);
1047 
1048  /* charset */
1049  i=SendDlgItemMessageW(hDlg, cmb5, CB_GETCURSEL, 0, 0);
1050  if (i!=CB_ERR)
1052  else
1053  lpxx->lfCharSet = DEFAULT_CHARSET;
1054  lpxx->lfStrikeOut=IsDlgButtonChecked(hDlg,chx1);
1055  lpxx->lfUnderline=IsDlgButtonChecked(hDlg,chx2);
1056  lpxx->lfWidth=lpxx->lfOrientation=lpxx->lfEscapement=0;
1059  lpxx->lfQuality=DEFAULT_QUALITY;
1060 
1061  wininfo.cbSize=sizeof(wininfo);
1062 
1063  if( GetWindowInfo( GetDlgItem( hDlg, stc5), &wininfo ) )
1064  {
1065  MapWindowPoints( 0, hDlg, (LPPOINT) &wininfo.rcWindow, 2);
1066  InvalidateRect( hDlg, &wininfo.rcWindow, TRUE );
1067  }
1068  }
1069  break;
1070 
1071  case cmb4:
1072  i=SendDlgItemMessageW(hDlg, cmb4, CB_GETCURSEL, 0, 0);
1073  if (i!=CB_ERR)
1074  {
1075  WINDOWINFO wininfo;
1076 
1077  lpcf->rgbColors = SendDlgItemMessageW(hDlg, cmb4, CB_GETITEMDATA, i, 0);
1078  wininfo.cbSize=sizeof(wininfo);
1079 
1080  if( GetWindowInfo( GetDlgItem( hDlg, stc5), &wininfo ) )
1081  {
1082  MapWindowPoints( 0, hDlg, (LPPOINT) &wininfo.rcWindow, 2);
1083  InvalidateRect( hDlg, &wininfo.rcWindow, TRUE );
1084  }
1085  }
1086  break;
1087 
1088  case psh15:
1090  if (lpcf->hwndOwner)
1091  SendMessageW(lpcf->hwndOwner, i, 0, (LPARAM)GetPropW(hDlg, strWineFontData));
1092  break;
1093 
1094  case IDOK:
1095  {
1096  WCHAR msgW[80];
1097  INT pointsize;
1098 
1099  pointsize = get_dialog_font_point_size(hDlg, lpcf);
1100  if (pointsize == -1)
1101  {
1103  MessageBoxW(hDlg, msgW, NULL, MB_OK | MB_ICONINFORMATION);
1104  return TRUE;
1105  }
1106 
1107  if ( (!(lpcf->Flags & CF_LIMITSIZE)) ||
1108  ( (lpcf->Flags & CF_LIMITSIZE) &&
1109  (lpcf->iPointSize >= 10 * lpcf->nSizeMin) &&
1110  (lpcf->iPointSize <= 10 * lpcf->nSizeMax)))
1111  EndDialog(hDlg, TRUE);
1112  else
1113  {
1114  WCHAR format[80];
1115  DWORD_PTR args[2];
1117  args[0] = lpcf->nSizeMin;
1118  args[1] = lpcf->nSizeMax;
1120  format, 0, 0, msgW, ARRAY_SIZE(msgW),
1121  (__ms_va_list*)args);
1122  MessageBoxW(hDlg, msgW, NULL, MB_OK);
1123  }
1124  return(TRUE);
1125  }
1126  case IDCANCEL:
1127  EndDialog(hDlg, FALSE);
1128  return(TRUE);
1129  }
1130  return(FALSE);
1131 }
static BOOL CFn_FitFontStyle(HWND hDlg, LONG packedstyle)
Definition: fontdlg.c:566
INT iPointSize
Definition: commdlg.h:283
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
Definition: dialog.c:2208
static const char __ms_va_list
Definition: printf.c:70
#define TRUE
Definition: types.h:120
DWORD cbSize
Definition: winuser.h:3740
#define IDOK
Definition: winuser.h:824
BYTE lfPitchAndFamily
Definition: dimm.idl:71
DECLSPEC_HIDDEN HINSTANCE COMDLG32_hInstance
Definition: cdlg32.c:42
LONG lfWidth
Definition: wingdi.h:1893
CFF_Charset charset
Definition: cffcmap.c:138
LONG lfOrientation
Definition: wingdi.h:1895
#define DEFAULT_QUALITY
Definition: wingdi.h:435
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define IDS_FONT_SIZE
Definition: cdlg.h:173
int WINAPI EnumFontFamiliesExW(_In_ HDC, _In_ PLOGFONTW, _In_ FONTENUMPROCW, _In_ LPARAM, _In_ DWORD)
#define CB_GETLBTEXT
Definition: winuser.h:1934
#define CB_GETITEMDATA
Definition: winuser.h:1932
#define FORMAT_MESSAGE_ARGUMENT_ARRAY
Definition: winbase.h:405
#define FORMAT_MESSAGE_FROM_STRING
Definition: winbase.h:402
BYTE lfCharSet
Definition: dimm.idl:67
static HDC
Definition: imagelist.c:92
#define cmb5
Definition: dlgs.h:52
HICON HCURSOR
Definition: windef.h:284
static void CFn_FitFontSize(HWND hDlg, int points)
Definition: fontdlg.c:546
DWORD WINAPI FormatMessageW(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, __ms_va_list *args)
Definition: format_msg.c:583
#define DEFAULT_CHARSET
Definition: wingdi.h:383
Definition: match.c:390
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
int32_t INT
Definition: typedefs.h:56
#define CB_GETCURSEL
Definition: winuser.h:1925
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
WORD nFontType
Definition: commdlg.h:291
static INT get_dialog_font_point_size(HWND hDlg, CHOOSEFONTW *cf)
Definition: fontdlg.c:895
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define lstrcpynW
Definition: compat.h:397
static HDC CFn_GetDC(const CHOOSEFONTW *lpcf)
Definition: fontdlg.c:454
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
#define ITALIC_FONTTYPE
Definition: commdlg.h:91
#define psh15
Definition: dlgs.h:126
static BOOL CFn_FitCharSet(HWND hDlg, int charset)
Definition: fontdlg.c:584
HWND hwndOwner
Definition: commdlg.h:280
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
#define CF_LIMITSIZE
Definition: commdlg.h:75
#define chx1
Definition: dlgs.h:31
unsigned int BOOL
Definition: ntddk_ex.h:94
#define chx2
Definition: dlgs.h:32
long LONG
Definition: pedump.c:60
BYTE lfItalic
Definition: wingdi.h:1897
#define debugstr_w
Definition: kernel32.h:32
#define CLIP_DEFAULT_PRECIS
Definition: wingdi.h:425
unsigned int idx
Definition: utils.c:41
LPLOGFONTW lpLogFont
Definition: commdlg.h:282
const WCHAR * str
BYTE lfOutPrecision
Definition: wingdi.h:1901
smooth NULL
Definition: ftsmooth.c:416
#define IDC_WAIT
Definition: winuser.h:684
LONG_PTR LPARAM
Definition: windef.h:208
RECT rcWindow
Definition: winuser.h:3741
#define CB_RESETCONTENT
Definition: winuser.h:1941
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
#define IDS_FONT_SIZE_INPUT
Definition: cdlg.h:180
#define CB_ERR
Definition: winuser.h:2410
r l[0]
Definition: byte_order.h:167
#define FW_MEDIUM
Definition: wingdi.h:374
BYTE lfClipPrecision
Definition: wingdi.h:1902
#define TRACE(s)
Definition: solgame.cpp:4
#define CBN_EDITCHANGE
Definition: winuser.h:1957
int WINAPI MessageBoxW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ UINT)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORD rgbColors
Definition: commdlg.h:285
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define OUT_DEFAULT_PRECIS
Definition: wingdi.h:414
LONG lfEscapement
Definition: wingdi.h:1894
#define BN_CLICKED
Definition: winuser.h:1907
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
DWORD Flags
Definition: commdlg.h:284
#define MB_ICONINFORMATION
Definition: winuser.h:796
HDC hdc
Definition: main.c:9
GLdouble s
Definition: gl.h:2039
#define CB_SETCURSEL
Definition: winuser.h:1943
uint32_t DWORD_PTR
Definition: typedefs.h:63
BYTE lfCharSet
Definition: wingdi.h:1900
static INT WINAPI FontStyleEnumProc(const ENUMLOGFONTEXW *lpElfex, const TEXTMETRICW *metrics, DWORD dwFontType, LPARAM lParam)
Definition: fontdlg.c:606
#define cmb2
Definition: dlgs.h:49
UINT WINAPI RegisterWindowMessageW(_In_ LPCWSTR)
BOOL WINAPI GetWindowInfo(_In_ HWND, _Inout_ PWINDOWINFO)
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define CB_SETEDITSEL
Definition: winuser.h:1945
#define ARRAY_SIZE(a)
Definition: main.h:24
FARPROC FONTENUMPROCW
Definition: wingdi.h:2892
#define HELPMSGSTRINGW
Definition: commdlg.h:27
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define cmb3
Definition: dlgs.h:50
#define MB_OK
Definition: winuser.h:784
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
#define CBN_SELCHANGE
Definition: winuser.h:1961
static void CFn_ReleaseDC(const CHOOSEFONTW *lpcf, HDC hdc)
Definition: fontdlg.c:481
LONG lfWeight
Definition: wingdi.h:1896
BYTE lfPitchAndFamily
Definition: wingdi.h:1904
BYTE lfStrikeOut
Definition: wingdi.h:1899
#define cmb4
Definition: dlgs.h:51
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
#define HIWORD(l)
Definition: typedefs.h:246
BYTE lfUnderline
Definition: wingdi.h:1898
BYTE lfQuality
Definition: wingdi.h:1903
WCHAR lfFaceName[LF_FACESIZE]
Definition: wingdi.h:1905
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define IDCANCEL
Definition: winuser.h:825
#define cmb1
Definition: dlgs.h:48
#define CB_FINDSTRING
Definition: winuser.h:1921
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define BOLD_FONTTYPE
Definition: commdlg.h:90
#define stc5
Definition: dlgs.h:164
static const WCHAR strWineFontData[]
Definition: fontdlg.c:51
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

Referenced by FormatCharDlgProcA(), and FormatCharDlgProcW().

◆ CFn_WMDestroy()

static LRESULT CFn_WMDestroy ( HWND  hwnd,
LPCHOOSEFONTW  lpcfw 
)
static

Definition at line 1133 of file fontdlg.c.

1134 {
1135  LPCHOOSEFONTA lpcfa;
1136  LPSTR lpszStyle;
1137  LPLOGFONTA lpLogFonta;
1138  int len;
1139 
1140  if (!lpcfw) return FALSE;
1141 
1142  lpcfa = GetPropW(hwnd, strWineFontData_a);
1143  lpLogFonta = lpcfa->lpLogFont;
1144  lpszStyle = lpcfa->lpszStyle;
1145  memcpy(lpcfa, lpcfw, sizeof(CHOOSEFONTA));
1146  lpcfa->lpLogFont = lpLogFonta;
1147  lpcfa->lpszStyle = lpszStyle;
1148  memcpy(lpcfa->lpLogFont, lpcfw->lpLogFont, sizeof(LOGFONTA));
1150  LF_FACESIZE, lpcfa->lpLogFont->lfFaceName, LF_FACESIZE, 0, 0);
1151 
1152  if((lpcfw->Flags & CF_USESTYLE) && lpcfw->lpszStyle) {
1153  len = WideCharToMultiByte(CP_ACP, 0, lpcfw->lpszStyle, -1, NULL, 0, 0, 0);
1154  WideCharToMultiByte(CP_ACP, 0, lpcfw->lpszStyle, -1, lpcfa->lpszStyle, len, 0, 0);
1155  heap_free(lpcfw->lpszStyle);
1156  }
1157 
1158  heap_free(lpcfw->lpLogFont);
1159  heap_free(lpcfw);
1161 
1162  return TRUE;
1163 }
#define CF_USESTYLE
Definition: commdlg.h:67
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
LPLOGFONTA lpLogFont
Definition: commdlg.h:264
#define TRUE
Definition: types.h:120
#define LF_FACESIZE
Definition: dimm.idl:39
#define WideCharToMultiByte
Definition: compat.h:101
#define CP_ACP
Definition: compat.h:99
char * LPSTR
Definition: xmlstorage.h:182
CHAR lfFaceName[LF_FACESIZE]
Definition: wingdi.h:1889
LPLOGFONTW lpLogFont
Definition: commdlg.h:282
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
DWORD Flags
Definition: commdlg.h:284
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
static const WCHAR strWineFontData_a[]
Definition: fontdlg.c:52
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
WCHAR lfFaceName[LF_FACESIZE]
Definition: wingdi.h:1905
LPSTR lpszStyle
Definition: commdlg.h:272
static const WCHAR strWineFontData[]
Definition: fontdlg.c:51
LPWSTR lpszStyle
Definition: commdlg.h:290
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by FormatCharDlgProcA().

◆ CFn_WMDrawItem()

static LRESULT CFn_WMDrawItem ( LPARAM  lParam)
static

Definition at line 793 of file fontdlg.c.

794 {
795  HBRUSH hBrush;
796  WCHAR buffer[40];
797  COLORREF cr, oldText=0, oldBk=0;
798  RECT rect;
799  int nFontType;
800  int cx, cy, idx;
802 
803  if (lpdi->itemID == (UINT)-1) /* got no items */
804  DrawFocusRect(lpdi->hDC, &lpdi->rcItem);
805  else
806  {
807  if (lpdi->CtlType == ODT_COMBOBOX)
808  {
809  if (lpdi->itemState & ODS_SELECTED)
810  {
813  oldBk=SetBkColor(lpdi->hDC, GetSysColor(COLOR_HIGHLIGHT));
814  } else
815  {
816  hBrush = SelectObject(lpdi->hDC, GetStockObject(LTGRAY_BRUSH));
817  SelectObject(lpdi->hDC, hBrush);
818  }
819  FillRect(lpdi->hDC, &lpdi->rcItem, hBrush);
820  }
821  else
822  return TRUE; /* this should never happen */
823 
824  rect=lpdi->rcItem;
825  switch (lpdi->CtlID)
826  {
827  case cmb1:
828  /* TRACE(commdlg,"WM_Drawitem cmb1\n"); */
831  (LPARAM)buffer);
832  TextOutW(lpdi->hDC, lpdi->rcItem.left + cx + 4,
833  lpdi->rcItem.top, buffer, lstrlenW(buffer));
834  nFontType = SendMessageW(lpdi->hwndItem, CB_GETITEMDATA, lpdi->itemID,0L);
835  idx = -1;
836  if (nFontType & TRUETYPE_FONTTYPE) {
837  idx = 0; /* picture: TT */
838  if( nFontType & NTM_TT_OPENTYPE)
839  idx = 2; /* picture: O */
840  } else if( nFontType & NTM_PS_OPENTYPE)
841  idx = 3; /* picture: O+ps */
842  else if( nFontType & NTM_TYPE1)
843  idx = 4; /* picture: a */
844  else if( nFontType & DEVICE_FONTTYPE)
845  idx = 1; /* picture: printer */
846  if( idx >= 0)
847  ImageList_Draw( himlTT, idx, lpdi->hDC, lpdi->rcItem.left,
848  (lpdi->rcItem.top + lpdi->rcItem.bottom - cy) / 2, ILD_TRANSPARENT);
849  break;
850  case cmb2:
851  case cmb3:
852  /* TRACE(commdlg,"WM_DRAWITEN cmb2,cmb3\n"); */
853  case cmb5:
855  (LPARAM)buffer);
856  TextOutW(lpdi->hDC, lpdi->rcItem.left,
857  lpdi->rcItem.top, buffer, lstrlenW(buffer));
858  break;
859 
860  case cmb4:
861  /* TRACE(commdlg,"WM_DRAWITEM cmb4 (=COLOR)\n"); */
863  (LPARAM)buffer);
864  TextOutW(lpdi->hDC, lpdi->rcItem.left + 25+5,
865  lpdi->rcItem.top, buffer, lstrlenW(buffer));
866  cr = SendMessageW(lpdi->hwndItem, CB_GETITEMDATA, lpdi->itemID,0L);
867  hBrush = CreateSolidBrush(cr);
868  if (hBrush)
869  {
870  hBrush = SelectObject (lpdi->hDC, hBrush) ;
871  rect.right=rect.left+25;
872  rect.top++;
873  rect.left+=5;
874  rect.bottom--;
875  Rectangle( lpdi->hDC, rect.left, rect.top,
876  rect.right, rect.bottom );
877  DeleteObject( SelectObject (lpdi->hDC, hBrush)) ;
878  }
879  rect=lpdi->rcItem;
880  rect.left+=25+5;
881  break;
882 
883  default:
884  return TRUE; /* this should never happen */
885  }
886  if (lpdi->itemState & ODS_SELECTED)
887  {
888  SetTextColor(lpdi->hDC, oldText);
889  SetBkColor(lpdi->hDC, oldBk);
890  }
891  }
892  return TRUE;
893 }
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define TRUE
Definition: types.h:120
#define COLOR_HIGHLIGHT
Definition: winuser.h:916
#define ODT_COMBOBOX
Definition: winuser.h:2514
#define DEVICE_FONTTYPE
Definition: wingdi.h:1107
struct tagDRAWITEMSTRUCT * LPDRAWITEMSTRUCT
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
#define CB_GETLBTEXT
Definition: winuser.h:1934
#define CB_GETITEMDATA
Definition: winuser.h:1932
BOOL WINAPI DrawFocusRect(_In_ HDC, _In_ LPCRECT)
static HIMAGELIST himlTT
Definition: fontdlg.c:58
LONG top
Definition: windef.h:292
#define cmb5
Definition: dlgs.h:52
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
GLuint buffer
Definition: glext.h:5915
BOOL WINAPI ImageList_Draw(HIMAGELIST himl, INT i, HDC hdc, INT x, INT y, UINT fStyle)
Definition: imagelist.c:1228
LONG left
Definition: windef.h:291
#define lstrlenW
Definition: compat.h:407
DWORD WINAPI GetSysColor(_In_ int)
& rect
Definition: startmenu.cpp:1413
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
Definition: dc.c:975
unsigned int idx
Definition: utils.c:41
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
#define LTGRAY_BRUSH
Definition: wingdi.h:899
LONG_PTR LPARAM
Definition: windef.h:208
#define COLOR_HIGHLIGHTTEXT
Definition: winuser.h:917
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORD COLORREF
Definition: windef.h:285
static const WCHAR L[]
Definition: oid.c:1250
BOOL WINAPI TextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_reads_(c) LPCWSTR lpString, _In_ int c)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
Definition: text.c:888
#define cmb2
Definition: dlgs.h:49
#define ILD_TRANSPARENT
Definition: commctrl.h:403
#define NTM_TYPE1
Definition: wingdi.h:29
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define cmb3
Definition: dlgs.h:50
unsigned int UINT
Definition: ndis.h:50
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
_Out_opt_ int * cx
Definition: commctrl.h:570
#define ODS_SELECTED
Definition: winuser.h:2520
#define NTM_PS_OPENTYPE
Definition: wingdi.h:26
BOOL WINAPI ImageList_GetIconSize(HIMAGELIST himl, INT *cx, INT *cy)
Definition: imagelist.c:2037
#define cmb4
Definition: dlgs.h:51
LONG bottom
Definition: windef.h:294
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HBRUSH WINAPI GetSysColorBrush(_In_ int)
#define cmb1
Definition: dlgs.h:48
LPARAM lParam
Definition: combotst.c:139
#define NTM_TT_OPENTYPE
Definition: wingdi.h:27
#define TRUETYPE_FONTTYPE
Definition: wingdi.h:1108

Referenced by FormatCharDlgProcA(), and FormatCharDlgProcW().

◆ CFn_WMInitDialog()

static LRESULT CFn_WMInitDialog ( HWND  hDlg,
LPARAM  lParam,
LPCHOOSEFONTW  lpcf 
)
static

Definition at line 620 of file fontdlg.c.

621 {
622  HDC hdc;
623  int i,j;
624  BOOL init = FALSE;
625  long pstyle;
627  LPLOGFONTW lpxx;
629  static const WCHAR strColorName[] = {'[','c','o','l','o','r',' ','n','a','m','e',']',0};
630 
631  SetPropW(hDlg, strWineFontData, lpcf);
632  lpxx=lpcf->lpLogFont;
633  TRACE("WM_INITDIALOG lParam=%08lX\n", lParam);
634 
635  if (lpcf->lStructSize != sizeof(CHOOSEFONTW))
636  {
637  ERR("structure size failure!!!\n");
638  EndDialog (hDlg, 0);
639  return FALSE;
640  }
641  if (!himlTT)
644 
645  /* Set effect flags */
646  if((lpcf->Flags & CF_EFFECTS) && (lpcf->Flags & CF_INITTOLOGFONTSTRUCT))
647  {
648  if(lpxx->lfUnderline)
649  CheckDlgButton(hDlg, chx2, TRUE);
650  if(lpxx->lfStrikeOut)
651  CheckDlgButton(hDlg, chx1, TRUE);
652  }
653 
654  if (!(lpcf->Flags & CF_SHOWHELP) || !IsWindow(lpcf->hwndOwner))
656  if (!(lpcf->Flags & CF_APPLY))
658  if (lpcf->Flags & CF_NOSCRIPTSEL)
660  if (lpcf->Flags & CF_EFFECTS)
661  {
662  for (i=0;i<TEXT_COLORS;i++)
663  {
664  WCHAR name[30];
665 
667  ARRAY_SIZE(name)) == 0 )
668  {
669  memcpy(name, strColorName, sizeof(strColorName));
670  }
673  /* look for a fitting value in color combobox */
674  if (textcolors[i]==lpcf->rgbColors)
676  }
677  }
678  else
679  {
685  }
686  if(!(hdc = CFn_GetDC(lpcf)))
687  {
688  EndDialog (hDlg, 0);
689  return FALSE;
690  }
691  s.hWnd1=GetDlgItem(hDlg,cmb1);
692  s.lpcf32w=lpcf;
693  do {
694  LOGFONTW elf;
695  s.added = 0;
696  elf.lfCharSet = DEFAULT_CHARSET; /* enum all charsets */
697  elf.lfPitchAndFamily = 0;
698  elf.lfFaceName[0] = '\0'; /* enum all fonts */
700  {
701  TRACE("EnumFontFamiliesEx returns 0\n");
702  break;
703  }
704  if (s.added) break;
705  if (lpcf->Flags & CF_FIXEDPITCHONLY) {
706  FIXME("No font found with fixed pitch only, dropping flag.\n");
707  lpcf->Flags &= ~CF_FIXEDPITCHONLY;
708  continue;
709  }
710  if (lpcf->Flags & CF_TTONLY) {
711  FIXME("No font found with truetype only, dropping flag.\n");
712  lpcf->Flags &= ~CF_TTONLY;
713  continue;
714  }
715  break;
716  } while (1);
717 
718 
719  if (lpcf->Flags & CF_INITTOLOGFONTSTRUCT)
720  {
721  /* look for fitting font name in combobox1 */
723  if (j!=CB_ERR)
724  {
725  INT height = lpxx->lfHeight < 0 ? -lpxx->lfHeight :
726  lpxx->lfHeight;
727  INT points;
728  int charset = lpxx->lfCharSet;
729  points = MulDiv( height, 72, GetScreenDPI());
730  pstyle = MAKELONG(lpxx->lfWeight > FW_MEDIUM ? FW_BOLD:
731  FW_NORMAL,lpxx->lfItalic !=0);
732  select_combo_item( hDlg, cmb1, j );
733  init = TRUE;
734  /* look for fitting font style in combobox2 */
735  CFn_FitFontStyle(hDlg, pstyle);
736  /* look for fitting font size in combobox3 */
737  CFn_FitFontSize(hDlg, points);
738  CFn_FitCharSet( hDlg, charset );
739  }
740  }
741  if (!init)
742  {
743  select_combo_item( hDlg, cmb1, 0 );
744  select_combo_item( hDlg, cmb2, 0 );
745  select_combo_item( hDlg, cmb3, 0 );
746  select_combo_item( hDlg, cmb5, 0 );
747  }
748  /* limit text length user can type in as font size */
749  SendDlgItemMessageW(hDlg, cmb3, CB_LIMITTEXT, 5, 0);
750 
751  if ((lpcf->Flags & CF_USESTYLE) && lpcf->lpszStyle)
752  {
754  if (j!=CB_ERR) select_combo_item( hDlg, cmb2, j );
755  }
756  CFn_ReleaseDC(lpcf, hdc);
757  SetCursor(hcursor);
758  return TRUE;
759 }
static BOOL CFn_FitFontStyle(HWND hDlg, LONG packedstyle)
Definition: fontdlg.c:566
#define CF_USESTYLE
Definition: commdlg.h:67
#define CF_TTONLY
Definition: commdlg.h:80
#define CB_SETITEMDATA
Definition: winuser.h:1948
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
#define TRUE
Definition: types.h:120
BYTE lfPitchAndFamily
Definition: dimm.idl:71
DECLSPEC_HIDDEN HINSTANCE COMDLG32_hInstance
Definition: cdlg32.c:42
CFF_Charset charset
Definition: cffcmap.c:138
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define CF_FIXEDPITCHONLY
Definition: commdlg.h:76
static const COLORREF textcolors[TEXT_COLORS]
Definition: fontdlg.c:290
#define CF_EFFECTS
Definition: commdlg.h:68
#define TEXT_COLORS
Definition: fontdlg.c:288
int WINAPI EnumFontFamiliesExW(_In_ HDC, _In_ PLOGFONTW, _In_ FONTENUMPROCW, _In_ LPARAM, _In_ DWORD)
#define SW_HIDE
Definition: winuser.h:762
#define IDS_COLOR_BLACK
Definition: cdlg.h:134
BYTE lfCharSet
Definition: dimm.idl:67
static HDC
Definition: imagelist.c:92
static HIMAGELIST himlTT
Definition: fontdlg.c:58
#define cmb5
Definition: dlgs.h:52
static void select_combo_item(HWND dialog, int id, int sel)
Definition: fontdlg.c:490
HICON HCURSOR
Definition: windef.h:284
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
static void CFn_FitFontSize(HWND hDlg, int points)
Definition: fontdlg.c:546
#define DEFAULT_CHARSET
Definition: wingdi.h:383
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
int32_t INT
Definition: typedefs.h:56
static int init
Definition: wintirpc.c:33
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
static HDC CFn_GetDC(const CHOOSEFONTW *lpcf)
Definition: fontdlg.c:454
static BOOL CFn_FitCharSet(HWND hDlg, int charset)
Definition: fontdlg.c:584
HWND hwndOwner
Definition: commdlg.h:280
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
static INT WINAPI FontFamilyEnumProc(const ENUMLOGFONTEXW *lpElfex, const TEXTMETRICW *metrics, DWORD dwFontType, LPARAM lParam)
Definition: fontdlg.c:353
#define chx1
Definition: dlgs.h:31
unsigned int BOOL
Definition: ntddk_ex.h:94
#define chx2
Definition: dlgs.h:32
BYTE lfItalic
Definition: wingdi.h:1897
#define psh3
Definition: dlgs.h:114
#define FIXME(fmt,...)
Definition: debug.h:110
LPLOGFONTW lpLogFont
Definition: commdlg.h:282
#define CB_ADDSTRING
Definition: winuser.h:1918
#define MAKELONG(a, b)
Definition: typedefs.h:248
LONG lfHeight
Definition: wingdi.h:1892
#define IDC_WAIT
Definition: winuser.h:684
LONG_PTR LPARAM
Definition: windef.h:208
#define stc4
Definition: dlgs.h:163
#define CB_LIMITTEXT
Definition: winuser.h:1940
#define CF_NOSCRIPTSEL
Definition: commdlg.h:85
#define CB_ERR
Definition: winuser.h:2410
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
#define FW_MEDIUM
Definition: wingdi.h:374
#define TRACE(s)
Definition: solgame.cpp:4
#define TTBITMAP_XSIZE
Definition: fontdlg.c:59
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORD rgbColors
Definition: commdlg.h:285
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
DWORD Flags
Definition: commdlg.h:284
GLsizei const GLfloat * points
Definition: glext.h:8112
HDC hdc
Definition: main.c:9
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLdouble s
Definition: gl.h:2039
#define CB_SETCURSEL
Definition: winuser.h:1943
#define CF_SHOWHELP
Definition: commdlg.h:62
#define grp1
Definition: dlgs.h:86
BYTE lfCharSet
Definition: wingdi.h:1900
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
DWORD lStructSize
Definition: commdlg.h:279
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define ERR(fmt,...)
Definition: debug.h:109
#define cmb2
Definition: dlgs.h:49
#define FW_BOLD
Definition: wingdi.h:377
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define ARRAY_SIZE(a)
Definition: main.h:24
FARPROC FONTENUMPROCW
Definition: wingdi.h:2892
#define CF_APPLY
Definition: commdlg.h:69
#define cmb3
Definition: dlgs.h:50
#define IMAGE_BITMAP
Definition: winuser.h:211
#define pshHelp
Definition: dlgs.h:127
static void CFn_ReleaseDC(const CHOOSEFONTW *lpcf, HDC hdc)
Definition: fontdlg.c:481
#define FW_NORMAL
Definition: wingdi.h:372
LONG lfWeight
Definition: wingdi.h:1896
#define CLR_DEFAULT
Definition: commctrl.h:305
HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE hi, LPCWSTR lpbmp, INT cx, INT cGrow, COLORREF clrMask, UINT uType, UINT uFlags)
Definition: imagelist.c:2208
Definition: name.c:36
BYTE lfStrikeOut
Definition: wingdi.h:1899
#define cmb4
Definition: dlgs.h:51
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
BYTE lfUnderline
Definition: wingdi.h:1898
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
WCHAR lfFaceName[LF_FACESIZE]
Definition: wingdi.h:1905
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define cmb1
Definition: dlgs.h:48
#define CB_FINDSTRING
Definition: winuser.h:1921
LPARAM lParam
Definition: combotst.c:139
#define MulDiv(x, y, z)
Definition: gdifloat.h:86
#define CF_INITTOLOGFONTSTRUCT
Definition: commdlg.h:66
static const WCHAR strWineFontData[]
Definition: fontdlg.c:51
LPWSTR lpszStyle
Definition: commdlg.h:290
static int GetScreenDPI(void)
Definition: fontdlg.c:466

Referenced by FormatCharDlgProcA(), and FormatCharDlgProcW().

◆ CFn_WMMeasureItem()

static LRESULT CFn_WMMeasureItem ( HWND  hDlg,
LPARAM  lParam 
)
static

Definition at line 765 of file fontdlg.c.

766 {
767  HDC hdc;
768  HFONT hfontprev;
769  TEXTMETRICW tm;
771  INT height = 0, cx;
772 
773  if (!himlTT)
777  lpmi->itemHeight = height + 2;
778  /* use MAX of bitmap height and tm.tmHeight .*/
779  hdc=GetDC(hDlg);
780  if(!hdc) return 0;
781  hfontprev = SelectObject( hdc, (HFONT)SendMessageW( hDlg, WM_GETFONT, 0, 0 ));
783  if( tm.tmHeight > lpmi->itemHeight) lpmi->itemHeight = tm.tmHeight;
784  SelectObject(hdc, hfontprev);
785  ReleaseDC(hDlg, hdc);
786  return 0;
787 }
struct tagMEASUREITEMSTRUCT * LPMEASUREITEMSTRUCT
DECLSPEC_HIDDEN HINSTANCE COMDLG32_hInstance
Definition: cdlg32.c:42
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
Definition: text.c:221
HDC WINAPI GetDC(_In_opt_ HWND)
static HDC
Definition: imagelist.c:92
static HIMAGELIST himlTT
Definition: fontdlg.c:58
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
int32_t INT
Definition: typedefs.h:56
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define WM_GETFONT
Definition: winuser.h:1633
#define TTBITMAP_XSIZE
Definition: fontdlg.c:59
HDC hdc
Definition: main.c:9
Definition: time.h:76
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IMAGE_BITMAP
Definition: winuser.h:211
#define CLR_DEFAULT
Definition: commctrl.h:305
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE hi, LPCWSTR lpbmp, INT cx, INT cGrow, COLORREF clrMask, UINT uType, UINT uFlags)
Definition: imagelist.c:2208
_Out_opt_ int * cx
Definition: commctrl.h:570
BOOL WINAPI ImageList_GetIconSize(HIMAGELIST himl, INT *cx, INT *cy)
Definition: imagelist.c:2037
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
LPARAM lParam
Definition: combotst.c:139

Referenced by FormatCharDlgProcA(), and FormatCharDlgProcW().

◆ CFn_WMPaint()

static LRESULT CFn_WMPaint ( HWND  hDlg,
WPARAM  wParam,
LPARAM  lParam,
const CHOOSEFONTW lpcf 
)
static

Definition at line 1165 of file fontdlg.c.

1166 {
1167  WINDOWINFO info;
1168 
1169  if (!lpcf) return FALSE;
1170 
1171  info.cbSize=sizeof(info);
1172  if( GetWindowInfo( GetDlgItem( hDlg, stc5), &info ) )
1173  {
1174  PAINTSTRUCT ps;
1175  HDC hdc;
1176  HFONT hOrigFont;
1177  LOGFONTW lf = *(lpcf->lpLogFont);
1178 
1179  MapWindowPoints( 0, hDlg, (LPPOINT) &info.rcWindow, 2);
1180  hdc = BeginPaint( hDlg, &ps );
1181 
1182  TRACE("erase %d, rect=%s\n", ps.fErase, wine_dbgstr_rect(&ps.rcPaint));
1183 
1184  /* Paint frame */
1185  DrawEdge( hdc, &info.rcWindow, EDGE_SUNKEN, BF_RECT|BF_ADJUST );
1186 
1187  /* Draw the sample text itself */
1188  hOrigFont = SelectObject( hdc, CreateFontIndirectW( &lf ) );
1189  SetTextColor( hdc, lpcf->rgbColors );
1190 
1191  DrawTextW( hdc,
1193  -1, &info.rcWindow, DT_CENTER|DT_VCENTER|DT_SINGLELINE );
1194 
1195  DeleteObject(SelectObject( hdc, hOrigFont ));
1196  EndPaint( hDlg, &ps );
1197  }
1198  return FALSE;
1199 }
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
static HDC
Definition: imagelist.c:92
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
#define BF_ADJUST
Definition: winuser.h:470
struct _test_info info[]
Definition: SetCursorPos.c:19
#define BF_RECT
Definition: winuser.h:462
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
LPLOGFONTW lpLogFont
Definition: commdlg.h:282
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
#define DT_VCENTER
Definition: winuser.h:543
static const BYTE CHARSET_ORDER[256]
Definition: fontdlg.c:110
#define TRACE(s)
Definition: solgame.cpp:4
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
DWORD rgbColors
Definition: commdlg.h:285
const char * wine_dbgstr_rect(const RECT *rect)
HDC hdc
Definition: main.c:9
BYTE lfCharSet
Definition: wingdi.h:1900
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
Definition: text.c:888
#define DT_SINGLELINE
Definition: winuser.h:540
BOOL WINAPI GetWindowInfo(_In_ HWND, _Inout_ PWINDOWINFO)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
#define DT_CENTER
Definition: winuser.h:527
#define EDGE_SUNKEN
Definition: winuser.h:451
static const WCHAR *const sample_lang_text[]
Definition: fontdlg.c:102
#define stc5
Definition: dlgs.h:164
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
Definition: defwnd.c:17

Referenced by FormatCharDlgProcA(), and FormatCharDlgProcW().

◆ ChooseFontA()

BOOL WINAPI ChooseFontA ( LPCHOOSEFONTA  lpChFont)

Definition at line 239 of file fontdlg.c.

240 {
241  LPCVOID template;
242  HRSRC hResInfo;
243  HINSTANCE hDlginst;
244  HGLOBAL hDlgTmpl;
245 
246  TRACE("(%p)\n", lpChFont);
247 
248  if ( (lpChFont->Flags&CF_ENABLETEMPLATEHANDLE)!=0 )
249  {
250  template=lpChFont->hInstance;
251  } else
252  {
253  if ( (lpChFont->Flags&CF_ENABLETEMPLATE)!=0 )
254  {
255  hDlginst=lpChFont->hInstance;
256  if( !(hResInfo = FindResourceA(hDlginst, lpChFont->lpTemplateName,
257  (LPSTR)RT_DIALOG)))
258  {
260  return FALSE;
261  }
262  } else
263  {
264  hDlginst=COMDLG32_hInstance;
265  if (!(hResInfo = FindResourceW(hDlginst, chooseFontW, (LPWSTR)RT_DIALOG)))
266  {
268  return FALSE;
269  }
270  }
271  if (!(hDlgTmpl = LoadResource(hDlginst, hResInfo )) ||
272  !(template = LockResource( hDlgTmpl )))
273  {
275  return FALSE;
276  }
277  }
278  if (TRACE_ON(commdlg))
279  _dump_cf_flags(lpChFont->Flags);
280  if (lpChFont->Flags & CF_SELECTSCRIPT)
281  FIXME(": unimplemented flag (ignored)\n");
282 
284  lpChFont->hwndOwner, FormatCharDlgProcA, (LPARAM)lpChFont );
285 }
DECLSPEC_HIDDEN HINSTANCE COMDLG32_hInstance
Definition: cdlg32.c:42
#define CDERR_LOADRESFAILURE
Definition: cderr.h:12
LPCSTR lpTemplateName
Definition: commdlg.h:270
HRSRC WINAPI FindResourceA(HMODULE hModule, LPCSTR name, LPCSTR type)
Definition: res.c:155
LPVOID WINAPI LockResource(HGLOBAL handle)
Definition: res.c:550
char * LPSTR
Definition: xmlstorage.h:182
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
Definition: res.c:176
#define CF_ENABLETEMPLATEHANDLE
Definition: commdlg.h:65
#define CDERR_FINDRESFAILURE
Definition: cderr.h:11
#define FIXME(fmt,...)
Definition: debug.h:110
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:532
LONG_PTR LPARAM
Definition: windef.h:208
#define RT_DIALOG
Definition: pedump.c:367
#define TRACE(s)
Definition: solgame.cpp:4
static void _dump_cf_flags(DWORD cflags)
Definition: fontdlg.c:162
INT_PTR WINAPI DialogBoxIndirectParamA(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
DWORD Flags
Definition: commdlg.h:266
static const WCHAR chooseFontW[]
Definition: fontdlg.c:54
HWND hwndOwner
Definition: commdlg.h:262
HINSTANCE hInstance
Definition: commdlg.h:271
void COMDLG32_SetCommDlgExtendedError(DWORD err) DECLSPEC_HIDDEN
Definition: cdlg32.c:119
#define CF_SELECTSCRIPT
Definition: commdlg.h:84
CONST void * LPCVOID
Definition: windef.h:191
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define CF_ENABLETEMPLATE
Definition: commdlg.h:64
#define TRACE_ON(x)
Definition: compat.h:65
static INT_PTR CALLBACK FormatCharDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: fontdlg.c:1204

Referenced by test_ChooseFontA().

◆ ChooseFontW()

BOOL WINAPI ChooseFontW ( LPCHOOSEFONTW  lpChFont)

Definition at line 185 of file fontdlg.c.

186 {
187  LPCVOID template;
188  HRSRC hResInfo;
189  HINSTANCE hDlginst;
190  HGLOBAL hDlgTmpl;
191 
192  TRACE("(%p)\n", lpChFont);
193 
194  if ( (lpChFont->Flags&CF_ENABLETEMPLATEHANDLE)!=0 )
195  {
196  template=lpChFont->hInstance;
197  } else
198  {
199  if ( (lpChFont->Flags&CF_ENABLETEMPLATE)!=0 )
200  {
201  hDlginst=lpChFont->hInstance;
202  if( !(hResInfo = FindResourceW(hDlginst, lpChFont->lpTemplateName,
203  (LPWSTR)RT_DIALOG)))
204  {
206  return FALSE;
207  }
208  } else
209  {
210  hDlginst=COMDLG32_hInstance;
211  if (!(hResInfo = FindResourceW(hDlginst, chooseFontW, (LPWSTR)RT_DIALOG)))
212  {
214  return FALSE;
215  }
216  }
217  if (!(hDlgTmpl = LoadResource(hDlginst, hResInfo )) ||
218  !(template = LockResource( hDlgTmpl )))
219  {
221  return FALSE;
222  }
223  }
224  if (TRACE_ON(commdlg))
225  _dump_cf_flags(lpChFont->Flags);
226 
227  if (lpChFont->Flags & CF_SELECTSCRIPT)
228  FIXME(": unimplemented flag (ignored)\n");
229 
231  lpChFont->hwndOwner, FormatCharDlgProcW, (LPARAM)lpChFont );
232 }
DECLSPEC_HIDDEN HINSTANCE COMDLG32_hInstance
Definition: cdlg32.c:42
#define CDERR_LOADRESFAILURE
Definition: cderr.h:12
LPCWSTR lpTemplateName
Definition: commdlg.h:288
LPVOID WINAPI LockResource(HGLOBAL handle)
Definition: res.c:550
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
Definition: res.c:176
#define CF_ENABLETEMPLATEHANDLE
Definition: commdlg.h:65
#define CDERR_FINDRESFAILURE
Definition: cderr.h:11
HWND hwndOwner
Definition: commdlg.h:280
#define FIXME(fmt,...)
Definition: debug.h:110
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:532
LONG_PTR LPARAM
Definition: windef.h:208
#define RT_DIALOG
Definition: pedump.c:367
#define TRACE(s)
Definition: solgame.cpp:4
static void _dump_cf_flags(DWORD cflags)
Definition: fontdlg.c:162
DWORD Flags
Definition: commdlg.h:284
static const WCHAR chooseFontW[]
Definition: fontdlg.c:54
void COMDLG32_SetCommDlgExtendedError(DWORD err) DECLSPEC_HIDDEN
Definition: cdlg32.c:119
INT_PTR WINAPI DialogBoxIndirectParamW(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
#define CF_SELECTSCRIPT
Definition: commdlg.h:84
HINSTANCE hInstance
Definition: commdlg.h:289
CONST void * LPCVOID
Definition: windef.h:191
static INT_PTR CALLBACK FormatCharDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: fontdlg.c:1270
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define CF_ENABLETEMPLATE
Definition: commdlg.h:64
#define TRACE_ON(x)
Definition: compat.h:65

Referenced by choose_font(), and dialog_choose_font().

◆ FontFamilyEnumProc()

static INT WINAPI FontFamilyEnumProc ( const ENUMLOGFONTEXW lpElfex,
const TEXTMETRICW metrics,
DWORD  dwFontType,
LPARAM  lParam 
)
static

Definition at line 353 of file fontdlg.c.

355 {
358  return AddFontFamily( lpElfex, (const NEWTEXTMETRICEXW *) metrics,
359  dwFontType, e->lpcf32w, e->hWnd1, e);
360 }
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
Definition: glext.h:11745
#define e
Definition: ke_i.h:82
struct CFn_ENUMSTRUCT * LPCFn_ENUMSTRUCT
static INT AddFontFamily(const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW *lpNTM, UINT nFontType, const CHOOSEFONTW *lpcf, HWND hwnd, LPCFn_ENUMSTRUCT e)
Definition: fontdlg.c:313
LPARAM lParam
Definition: combotst.c:139

Referenced by CFn_WMInitDialog().

◆ FontStyleEnumProc()

static INT WINAPI FontStyleEnumProc ( const ENUMLOGFONTEXW lpElfex,
const TEXTMETRICW metrics,
DWORD  dwFontType,
LPARAM  lParam 
)
static

Definition at line 606 of file fontdlg.c.

608 {
610  HWND hcmb2=s->hWnd1;
611  HWND hcmb3=s->hWnd2;
612  HWND hDlg=GetParent(hcmb3);
613  return AddFontStyle( lpElfex, (const NEWTEXTMETRICEXW *) metrics,
614  dwFontType, s->lpcf32w, hcmb2, hcmb3, hDlg);
615 }
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
Definition: glext.h:11745
static INT AddFontStyle(const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW *lpNTM, UINT nFontType, const CHOOSEFONTW *lpcf, HWND hcmb2, HWND hcmb3, HWND hDlg)
Definition: fontdlg.c:500
struct CFn_ENUMSTRUCT * LPCFn_ENUMSTRUCT
GLdouble s
Definition: gl.h:2039
HWND WINAPI GetParent(_In_ HWND)
LPARAM lParam
Definition: combotst.c:139

Referenced by CFn_WMCommand().

◆ FormatCharDlgProcA()

static INT_PTR CALLBACK FormatCharDlgProcA ( HWND  hDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 1204 of file fontdlg.c.

1205 {
1206  LPCHOOSEFONTW lpcfw;
1207  LPCHOOSEFONTA lpcfa;
1208  INT_PTR res = FALSE;
1209  int len;
1210 
1211  if (uMsg!=WM_INITDIALOG) {
1212  lpcfw = GetPropW(hDlg, strWineFontData);
1213  if (lpcfw && CFn_HookCallChk32(lpcfw))
1214  res=CallWindowProcA((WNDPROC)lpcfw->lpfnHook, hDlg, uMsg, wParam, lParam);
1215  if (res)
1216  return res;
1217  } else {
1218  lpcfa=(LPCHOOSEFONTA)lParam;
1220 
1221  lpcfw = heap_alloc(sizeof(*lpcfw));
1222  memcpy(lpcfw, lpcfa, sizeof(CHOOSEFONTA));
1223  lpcfw->lpLogFont = heap_alloc(sizeof(*lpcfw->lpLogFont));
1224  memcpy(lpcfw->lpLogFont, lpcfa->lpLogFont, sizeof(LOGFONTA));
1227 
1228  if((lpcfa->Flags & CF_USESTYLE) && lpcfa->lpszStyle) {
1229  len = MultiByteToWideChar(CP_ACP, 0, lpcfa->lpszStyle, -1, NULL, 0);
1230  lpcfw->lpszStyle = heap_alloc(len * sizeof(WCHAR));
1231  MultiByteToWideChar(CP_ACP, 0, lpcfa->lpszStyle, -1, lpcfw->lpszStyle, len);
1232  }
1233 
1234  if (!CFn_WMInitDialog(hDlg, lParam, lpcfw))
1235  {
1236  TRACE("CFn_WMInitDialog returned FALSE\n");
1237  return FALSE;
1238  }
1239  if (CFn_HookCallChk32(lpcfw))
1241  }
1242  switch (uMsg)
1243  {
1244  case WM_MEASUREITEM:
1245  return CFn_WMMeasureItem(hDlg,lParam);
1246  case WM_DRAWITEM:
1247  return CFn_WMDrawItem(lParam);
1248  case WM_COMMAND:
1249  return CFn_WMCommand(hDlg, wParam, lParam, lpcfw);
1250  case WM_DESTROY:
1251  return CFn_WMDestroy(hDlg, lpcfw);
1253  {
1254  LOGFONTA *logfont = (LOGFONTA *)lParam;
1255  TRACE("WM_CHOOSEFONT_GETLOGFONT lParam=%08lX\n", lParam);
1256  memcpy( logfont, lpcfw->lpLogFont, FIELD_OFFSET( LOGFONTA, lfFaceName ));
1258  logfont->lfFaceName, LF_FACESIZE, NULL, NULL );
1259  break;
1260  }
1261  case WM_PAINT:
1262  return CFn_WMPaint(hDlg, wParam, lParam, lpcfw);
1263  }
1264  return res;
1265 }
#define CF_USESTYLE
Definition: commdlg.h:67
static LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam, LPCHOOSEFONTW lpcf)
Definition: fontdlg.c:923
LPLOGFONTA lpLogFont
Definition: commdlg.h:264
#define LF_FACESIZE
Definition: dimm.idl:39
#define WideCharToMultiByte
Definition: compat.h:101
static LRESULT CFn_WMDrawItem(LPARAM lParam)
Definition: fontdlg.c:793
#define CP_ACP
Definition: compat.h:99
static LRESULT CFn_WMInitDialog(HWND hDlg, LPARAM lParam, LPCHOOSEFONTW lpcf)
Definition: fontdlg.c:620
int32_t INT_PTR
Definition: typedefs.h:62
WPARAM wParam
Definition: combotst.c:138
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
CHAR lfFaceName[LF_FACESIZE]
Definition: wingdi.h:1889
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LPCFHOOKPROC lpfnHook
Definition: commdlg.h:269
LPLOGFONTW lpLogFont
Definition: commdlg.h:282
smooth NULL
Definition: ftsmooth.c:416
static BOOL CFn_HookCallChk32(const CHOOSEFONTW *lpcf)
Definition: fontdlg.c:301
#define WM_DESTROY
Definition: winuser.h:1591
static LRESULT CFn_WMDestroy(HWND hwnd, LPCHOOSEFONTW lpcfw)
Definition: fontdlg.c:1133
#define WM_CHOOSEFONT_GETLOGFONT
Definition: commdlg.h:93
#define TRACE(s)
Definition: solgame.cpp:4
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
__wchar_t WCHAR
Definition: xmlstorage.h:180
static LRESULT CFn_WMMeasureItem(HWND hDlg, LPARAM lParam)
Definition: fontdlg.c:765
#define WM_MEASUREITEM
Definition: winuser.h:1628
#define WM_PAINT
Definition: winuser.h:1602
LPCFHOOKPROC lpfnHook
Definition: commdlg.h:287
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
#define WM_COMMAND
Definition: winuser.h:1722
DWORD Flags
Definition: commdlg.h:266
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2880
static const WCHAR strWineFontData_a[]
Definition: fontdlg.c:52
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
#define MultiByteToWideChar
Definition: compat.h:100
#define WM_DRAWITEM
Definition: winuser.h:1627
GLuint res
Definition: glext.h:9613
CHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:55
WCHAR lfFaceName[LF_FACESIZE]
Definition: wingdi.h:1905
LPSTR lpszStyle
Definition: commdlg.h:272
struct tagCHOOSEFONTA * LPCHOOSEFONTA
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
static LRESULT CFn_WMPaint(HWND hDlg, WPARAM wParam, LPARAM lParam, const CHOOSEFONTW *lpcf)
Definition: fontdlg.c:1165
static const WCHAR strWineFontData[]
Definition: fontdlg.c:51
LPWSTR lpszStyle
Definition: commdlg.h:290

Referenced by ChooseFontA().

◆ FormatCharDlgProcW()

static INT_PTR CALLBACK FormatCharDlgProcW ( HWND  hDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 1270 of file fontdlg.c.

1271 {
1272  LPCHOOSEFONTW lpcf;
1273  INT_PTR res = FALSE;
1274 
1275  if (uMsg!=WM_INITDIALOG)
1276  {
1277  lpcf= GetPropW(hDlg, strWineFontData);
1278  if (lpcf && CFn_HookCallChk32(lpcf))
1279  res=CallWindowProcW((WNDPROC)lpcf->lpfnHook, hDlg, uMsg, wParam, lParam);
1280  if (res)
1281  return res;
1282  }
1283  else
1284  {
1285  lpcf=(LPCHOOSEFONTW)lParam;
1286  if (!CFn_WMInitDialog(hDlg, lParam, lpcf))
1287  {
1288  TRACE("CFn_WMInitDialog returned FALSE\n");
1289  return FALSE;
1290  }
1291  if (CFn_HookCallChk32(lpcf))
1293  }
1294  switch (uMsg)
1295  {
1296  case WM_MEASUREITEM:
1297  return CFn_WMMeasureItem(hDlg, lParam);
1298  case WM_DRAWITEM:
1299  return CFn_WMDrawItem(lParam);
1300  case WM_COMMAND:
1301  return CFn_WMCommand(hDlg, wParam, lParam, lpcf);
1302  case WM_DESTROY:
1303  return TRUE;
1305  TRACE("WM_CHOOSEFONT_GETLOGFONT lParam=%08lX\n", lParam);
1306  memcpy( (LOGFONTW *)lParam, lpcf->lpLogFont, sizeof(LOGFONTW) );
1307  break;
1308  case WM_PAINT:
1309  return CFn_WMPaint(hDlg, wParam, lParam, lpcf);
1310  }
1311  return res;
1312 }
static LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam, LPCHOOSEFONTW lpcf)
Definition: fontdlg.c:923
#define TRUE
Definition: types.h:120
static LRESULT CFn_WMDrawItem(LPARAM lParam)
Definition: fontdlg.c:793
static LRESULT CFn_WMInitDialog(HWND hDlg, LPARAM lParam, LPCHOOSEFONTW lpcf)
Definition: fontdlg.c:620
int32_t INT_PTR
Definition: typedefs.h:62
WPARAM wParam
Definition: combotst.c:138
LPLOGFONTW lpLogFont
Definition: commdlg.h:282
static BOOL CFn_HookCallChk32(const CHOOSEFONTW *lpcf)
Definition: fontdlg.c:301
#define WM_DESTROY
Definition: winuser.h:1591
#define WM_CHOOSEFONT_GETLOGFONT
Definition: commdlg.h:93
#define TRACE(s)
Definition: solgame.cpp:4
static LRESULT CFn_WMMeasureItem(HWND hDlg, LPARAM lParam)
Definition: fontdlg.c:765
#define WM_MEASUREITEM
Definition: winuser.h:1628
#define WM_PAINT
Definition: winuser.h:1602
LPCFHOOKPROC lpfnHook
Definition: commdlg.h:287
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define WM_COMMAND
Definition: winuser.h:1722
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2880
struct tagCHOOSEFONTW * LPCHOOSEFONTW
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
#define WM_DRAWITEM
Definition: winuser.h:1627
GLuint res
Definition: glext.h:9613
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
static LRESULT CFn_WMPaint(HWND hDlg, WPARAM wParam, LPARAM lParam, const CHOOSEFONTW *lpcf)
Definition: fontdlg.c:1165
static const WCHAR strWineFontData[]
Definition: fontdlg.c:51

Referenced by ChooseFontW().

◆ get_dialog_font_point_size()

static INT get_dialog_font_point_size ( HWND  hDlg,
CHOOSEFONTW cf 
)
static

Definition at line 895 of file fontdlg.c.

896 {
897  BOOL invalid_size = FALSE;
898  INT i, size;
899 
900  i = SendDlgItemMessageW(hDlg, cmb3, CB_GETCURSEL, 0, 0);
901  if (i != CB_ERR)
903  else
904  {
905  WCHAR buffW[8], *endptrW;
906 
907  GetDlgItemTextW(hDlg, cmb3, buffW, ARRAY_SIZE(buffW));
908  size = strtolW(buffW, &endptrW, 10);
909  invalid_size = size == 0 && *endptrW;
910 
911  if (size == 0)
912  size = 10;
913  }
914 
915  cf->iPointSize = 10 * size;
916  cf->lpLogFont->lfHeight = -MulDiv(cf->iPointSize, GetScreenDPI(), 720);
917  return invalid_size ? -1 : size;
918 }
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
Definition: dialog.c:2208
#define CB_GETITEMDATA
Definition: winuser.h:1932
#define strtolW(s, e, b)
Definition: unicode.h:33
int32_t INT
Definition: typedefs.h:56
#define CB_GETCURSEL
Definition: winuser.h:1925
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
unsigned int BOOL
Definition: ntddk_ex.h:94
#define CB_ERR
Definition: winuser.h:2410
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define ARRAY_SIZE(a)
Definition: main.h:24
#define cmb3
Definition: dlgs.h:50
#define LOWORD(l)
Definition: pedump.c:82
#define MulDiv(x, y, z)
Definition: gdifloat.h:86
static int GetScreenDPI(void)
Definition: fontdlg.c:466

Referenced by CFn_WMCommand().

◆ GetScreenDPI()

static int GetScreenDPI ( void  )
inlinestatic

Definition at line 466 of file fontdlg.c.

467 {
468  HDC hdc;
469  int result;
470 
471  hdc = GetDC(0);
473  ReleaseDC(0, hdc);
474 
475  return result;
476 }
HDC WINAPI GetDC(_In_opt_ HWND)
static HDC
Definition: imagelist.c:92
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC hdc
Definition: main.c:9
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
#define LOGPIXELSY
Definition: wingdi.h:718
GLuint64EXT * result
Definition: glext.h:11304

Referenced by AddFontStyle(), CFn_WMInitDialog(), and get_dialog_font_point_size().

◆ select_combo_item()

static void select_combo_item ( HWND  dialog,
int  id,
int  sel 
)
static

Definition at line 490 of file fontdlg.c.

491 {
492  HWND combo = GetDlgItem( dialog, id );
493  SendMessageW( combo, CB_SETCURSEL, sel, 0 );
495 }
#define MAKEWPARAM(l, h)
Definition: winuser.h:3948
LONG_PTR LPARAM
Definition: windef.h:208
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define CB_SETCURSEL
Definition: winuser.h:1943
#define WM_COMMAND
Definition: winuser.h:1722
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define CBN_SELCHANGE
Definition: winuser.h:1961
static HWND dialog
Definition: gui.c:33

Referenced by CFn_FitCharSet(), CFn_FitFontSize(), CFn_FitFontStyle(), and CFn_WMInitDialog().

◆ SetFontSizesToCombo3()

static BOOL SetFontSizesToCombo3 ( HWND  hwnd,
const CHOOSEFONTW lpcf 
)
static

Definition at line 441 of file fontdlg.c.

442 {
443  static const BYTE sizes[]={6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72};
444  unsigned int i;
445 
446  for (i = 0; i < ARRAY_SIZE(sizes); i++)
447  if (AddFontSizeToCombo3(hwnd, sizes[i], lpcf)) return TRUE;
448  return FALSE;
449 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TRUE
Definition: types.h:120
static BOOL AddFontSizeToCombo3(HWND hwnd, UINT h, const CHOOSEFONTW *lpcf)
Definition: fontdlg.c:418
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
static const struct @514 sizes[]
unsigned char BYTE
Definition: mem.h:68
#define ARRAY_SIZE(a)
Definition: main.h:24

Referenced by AddFontStyle().

◆ SetFontStylesToCombo2()

static BOOL SetFontStylesToCombo2 ( HWND  hwnd,
HDC  hdc,
const LOGFONTW lplf 
)
static

Definition at line 367 of file fontdlg.c.

368 {
369 #define FSTYLES 4
370  struct FONTSTYLE
371  {
372  int italic;
373  int weight;
374  UINT resId;
375  };
376  static const struct FONTSTYLE fontstyles[FSTYLES]={
377  { 0, FW_NORMAL, IDS_FONT_REGULAR },
378  { 1, FW_NORMAL, IDS_FONT_ITALIC },
379  { 0, FW_BOLD, IDS_FONT_BOLD },
381  };
382  HFONT hf;
383  TEXTMETRICW tm;
384  int i,j;
385  LOGFONTW lf;
386 
387  lf = *lplf;
388 
389  for (i=0;i<FSTYLES;i++)
390  {
391  lf.lfItalic=fontstyles[i].italic;
392  lf.lfWeight=fontstyles[i].weight;
393  hf=CreateFontIndirectW(&lf);
394  hf=SelectObject(hdc,hf);
396  hf=SelectObject(hdc,hf);
397  DeleteObject(hf);
398  /* font successful created ? */
399  if (((fontstyles[i].weight == FW_NORMAL && tm.tmWeight <= FW_MEDIUM) ||
400  (fontstyles[i].weight == FW_BOLD && tm.tmWeight > FW_MEDIUM)) &&
401  ((tm.tmItalic != 0)==fontstyles[i].italic))
402  {
403  WCHAR name[64];
404  LoadStringW(COMDLG32_hInstance, fontstyles[i].resId, name, 64);
406  if (j==CB_ERR) return TRUE;
408  MAKELONG(tm.tmWeight,fontstyles[i].italic));
409  if (j==CB_ERR) return TRUE;
410  }
411  }
412  return FALSE;
413 }
#define CB_SETITEMDATA
Definition: winuser.h:1948
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TRUE
Definition: types.h:120
DECLSPEC_HIDDEN HINSTANCE COMDLG32_hInstance
Definition: cdlg32.c:42
#define IDS_FONT_BOLD
Definition: cdlg.h:128
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
Definition: text.c:221
#define IDS_FONT_ITALIC
Definition: cdlg.h:129
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
#define IDS_FONT_REGULAR
Definition: cdlg.h:127
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
GLuint GLuint GLfloat weight
Definition: glext.h:11719
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
#define CB_ADDSTRING
Definition: winuser.h:1918
#define MAKELONG(a, b)
Definition: typedefs.h:248
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
LONG_PTR LPARAM
Definition: windef.h:208
#define CB_ERR
Definition: winuser.h:2410
#define FSTYLES
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
#define FW_MEDIUM
Definition: wingdi.h:374
__wchar_t WCHAR
Definition: xmlstorage.h:180
HDC hdc
Definition: main.c:9
Definition: time.h:76
#define FW_BOLD
Definition: wingdi.h:377
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BYTE lfItalic
Definition: dimm.idl:64
unsigned int UINT
Definition: ndis.h:50
#define FW_NORMAL
Definition: wingdi.h:372
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
Definition: name.c:36
#define IDS_FONT_BOLD_ITALIC
Definition: cdlg.h:130
LONG lfWeight
Definition: dimm.idl:63

Referenced by AddFontStyle().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( commdlg  )

Variable Documentation

◆ cfflags

const { ... } cfflags[]
Initial value:
= {
#define XX(x)
}

Referenced by _dump_cf_flags().

◆ CHARSET_ORDER

const BYTE CHARSET_ORDER[256]
static
Initial value:
={
CI(ANSI), 0, CI(SYMBOL), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CI(MAC), 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
CI(JIS), CI(HANGUL), CI(JOHAB), 0, 0, 0, CI(GB2312), 0, CI(BIG5), 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, CI(GREEK), CI(TURKISH), CI(VIETNAMESE), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, CI(HEBREW), CI(ARABIC), 0, 0, 0, 0, 0, 0, 0, CI(BALTIC), 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CI(RUSSIAN), 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CI(THAI), 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CI(EE), 0,
CI(VISCII), CI(TCVN), CI(KOI8), CI(ISO3), CI(ISO4), CI(ISO10), CI(CELTIC), 0, 0, 0, 0, 0, 0, 0, 0, CI(OEM),
}
Definition: isohybrid.c:57
#define CI(cs)
Definition: fontdlg.c:69

Definition at line 110 of file fontdlg.c.

Referenced by CFn_WMPaint().

◆ chooseFontW

const WCHAR chooseFontW[] = {'C','H','O','O','S','E','_','F','O','N','T',0}
static

Definition at line 54 of file fontdlg.c.

Referenced by ChooseFontA(), and ChooseFontW().

◆ fontsizefmtW

const WCHAR fontsizefmtW[] = {'%','d',0}
static

Definition at line 55 of file fontdlg.c.

Referenced by AddFontSizeToCombo3().

◆ himlTT

HIMAGELIST himlTT = 0
static

Definition at line 58 of file fontdlg.c.

Referenced by CFn_WMDrawItem(), CFn_WMInitDialog(), and CFn_WMMeasureItem().

◆ mask

Definition at line 130 of file fontdlg.c.

◆ name

Definition at line 131 of file fontdlg.c.

◆ sample_lang_text

const WCHAR* const sample_lang_text[]
static
Initial value:
={
static const WCHAR stOEM[]
Definition: fontdlg.c:89
static const WCHAR stTCVN[]
Definition: fontdlg.c:95
static const WCHAR stIso88594[]
Definition: fontdlg.c:98
static const WCHAR stVietname[]
Definition: fontdlg.c:83
static const WCHAR stEastEur[]
Definition: fontdlg.c:85
static const WCHAR stKOI8[]
Definition: fontdlg.c:96
static const WCHAR stGreek[]
Definition: fontdlg.c:78
static const WCHAR stWestern[]
Definition: fontdlg.c:72
static const WCHAR stBIG5[]
Definition: fontdlg.c:77
static const WCHAR stBaltic[]
Definition: fontdlg.c:82
static const WCHAR stIso88593[]
Definition: fontdlg.c:97
static const WCHAR stVISCII[]
Definition: fontdlg.c:94
static const WCHAR stArabic[]
Definition: fontdlg.c:81
static const WCHAR stHebrew[]
Definition: fontdlg.c:80
static const WCHAR stShiftJis[]
Definition: fontdlg.c:74
static const WCHAR stJohab[]
Definition: fontdlg.c:87
static const WCHAR stGB2312[]
Definition: fontdlg.c:76
static const WCHAR stHangul[]
Definition: fontdlg.c:75
static const WCHAR stSymbol[]
Definition: fontdlg.c:73
static const WCHAR stIso885910[]
Definition: fontdlg.c:99
static const WCHAR stMac[]
Definition: fontdlg.c:88
static const WCHAR stCyrillic[]
Definition: fontdlg.c:84
static const WCHAR stThai[]
Definition: fontdlg.c:86
static const WCHAR stTurkish[]
Definition: fontdlg.c:79
static const WCHAR stCeltic[]
Definition: fontdlg.c:100

Definition at line 102 of file fontdlg.c.

Referenced by CFn_WMPaint().

◆ stArabic

const WCHAR stArabic[] ={'A','a','B','b',0x0627,0x0628,0x062c,0x062f,0x0647,0x0648,0x0632,0}
static

Definition at line 81 of file fontdlg.c.

◆ stBaltic

const WCHAR stBaltic[] ={'A','a','B','b','Y','y','Z','z',0}
static

Definition at line 82 of file fontdlg.c.

◆ stBIG5

const WCHAR stBIG5[] ={0x4e2d,0x6587,0x5b57,0x578b,0x7bc4,0x4f8b,0}
static

Definition at line 77 of file fontdlg.c.

◆ stCeltic

const WCHAR stCeltic[] ={'A','a','B','b',0}
static

Definition at line 100 of file fontdlg.c.

◆ stCyrillic

const WCHAR stCyrillic[] ={'A','a','B','b',0x0411,0x0431,0x0424,0x0444,0}
static

Definition at line 84 of file fontdlg.c.

◆ stEastEur

const WCHAR stEastEur[] ={'A','a','B','b',0xc1,0xe1,0xd4,0xf4,0}
static

Definition at line 85 of file fontdlg.c.

◆ stGB2312

const WCHAR stGB2312[] ={0x5fae,0x8f6f,0x4e2d,0x6587,0x8f6f,0x4ef6,0}
static

Definition at line 76 of file fontdlg.c.

◆ stGreek

const WCHAR stGreek[] ={'A','a','B','b',0x0391,0x03b1,0x0392,0x03b2,0}
static

Definition at line 78 of file fontdlg.c.

◆ stHangul

const WCHAR stHangul[] ={0xac00,0xb098,0xb2e4,'A','a','B','Y','y','Z','z',0}
static

Definition at line 75 of file fontdlg.c.

◆ stHebrew

const WCHAR stHebrew[] ={'A','a','B','b',0x05e0,0x05e1,0x05e9,0x05ea,0}
static

Definition at line 80 of file fontdlg.c.

◆ stIso885910

const WCHAR stIso885910[] ={'A','a','B','b',0}
static

Definition at line 99 of file fontdlg.c.

◆ stIso88593

const WCHAR stIso88593[] ={'A','a','B','b',0}
static

Definition at line 97 of file fontdlg.c.

◆ stIso88594

const WCHAR stIso88594[] ={'A','a','B','b',0}
static

Definition at line 98 of file fontdlg.c.

◆ stJohab

const WCHAR stJohab[] ={0xac00,0xb098,0xb2e4,'A','a','B','Y','y','Z','z',0}
static

Definition at line 87 of file fontdlg.c.

◆ stKOI8

const WCHAR stKOI8[] ={'A','a','B','b',0}
static

Definition at line 96 of file fontdlg.c.

◆ stMac

const WCHAR stMac[] ={'A','a','B','b','Y','y','Z','z',0}
static

Definition at line 88 of file fontdlg.c.

◆ stOEM

const WCHAR stOEM[] ={'A','a','B','b',0xf8,0xf1,0xfd,0}
static

Definition at line 89 of file fontdlg.c.

◆ strWineFontData

const WCHAR strWineFontData[] = {'_','_','W','I','N','E','_','F','O','N','T','D','L','G','D','A','T','A',0}
static

◆ strWineFontData_a

const WCHAR strWineFontData_a[]
static
Initial value:
=
{'_','_','W','I','N','E','_','F','O','N','T','D','L','G','D','A','T','A','_','A',0}

Definition at line 52 of file fontdlg.c.

Referenced by CFn_WMDestroy(), and FormatCharDlgProcA().

◆ stShiftJis

const WCHAR stShiftJis[] ={'A','a',0x3042,0x3041,0x30a2,0x30a1,0x4e9c,0x5b87,0}
static

Definition at line 74 of file fontdlg.c.

◆ stSymbol

const WCHAR stSymbol[] ={'S','y','m','b','o','l',0}
static

Definition at line 73 of file fontdlg.c.

◆ stTCVN

const WCHAR stTCVN[] ={'A','a','B','b',0}
static

Definition at line 95 of file fontdlg.c.

◆ stThai

const WCHAR stThai[] ={'A','a','B','b',0x0e2d,0x0e31,0x0e01,0x0e29,0x0e23,0x0e44,0x0e17,0x0e22,0}
static

Definition at line 86 of file fontdlg.c.

◆ stTurkish

const WCHAR stTurkish[] ={'A','a','B','b',0x011e,0x011f,0x015e,0x015f,0}
static

Definition at line 79 of file fontdlg.c.

◆ stVietname

const WCHAR stVietname[] ={'A','a','B','b',0x01a0,0x01a1,0x01af,0x01b0,0}
static

Definition at line 83 of file fontdlg.c.

◆ stVISCII

const WCHAR stVISCII[] ={'A','a','B','b',0}
static

Definition at line 94 of file fontdlg.c.

◆ stWestern

const WCHAR stWestern[] ={'A','a','B','b','Y','y','Z','z',0}
static

Definition at line 72 of file fontdlg.c.

◆ textcolors

const COLORREF textcolors[TEXT_COLORS]
static
Initial value:
=
{
0x00000000L,0x00000080L,0x00008000L,0x00008080L,
0x00800000L,0x00800080L,0x00808000L,0x00808080L,
0x00c0c0c0L,0x000000ffL,0x0000ff00L,0x0000ffffL,
0x00ff0000L,0x00ff00ffL,0x00ffff00L,0x00FFFFFFL
}
static const WCHAR L[]
Definition: oid.c:1250

Definition at line 290 of file fontdlg.c.

Referenced by CFn_WMInitDialog().