Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
48a3f53a
Commit
48a3f53a
authored
May 05, 2001
by
Marcus Meissner
Committed by
Alexandre Julliard
May 05, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debug output for flags, select first available height and weight when
selecting a font.
parent
ee44d885
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
0 deletions
+54
-0
fontdlg.c
dlls/commdlg/fontdlg.c
+54
-0
No files found.
dlls/commdlg/fontdlg.c
View file @
48a3f53a
...
...
@@ -72,6 +72,50 @@ static void CFn_CHOOSEFONT16to32A(LPCHOOSEFONT16 chf16, LPCHOOSEFONTA chf32a)
FONT_LogFont16To32A
(
MapSL
(
chf16
->
lpLogFont
),
chf32a
->
lpLogFont
);
}
struct
{
int
mask
;
char
*
name
;
}
cfflags
[]
=
{
#define XX(x) { x, #x },
XX
(
CF_SCREENFONTS
)
XX
(
CF_PRINTERFONTS
)
XX
(
CF_SHOWHELP
)
XX
(
CF_ENABLEHOOK
)
XX
(
CF_ENABLETEMPLATE
)
XX
(
CF_ENABLETEMPLATEHANDLE
)
XX
(
CF_INITTOLOGFONTSTRUCT
)
XX
(
CF_USESTYLE
)
XX
(
CF_EFFECTS
)
XX
(
CF_APPLY
)
XX
(
CF_ANSIONLY
)
XX
(
CF_NOVECTORFONTS
)
XX
(
CF_NOSIMULATIONS
)
XX
(
CF_LIMITSIZE
)
XX
(
CF_FIXEDPITCHONLY
)
XX
(
CF_WYSIWYG
)
XX
(
CF_FORCEFONTEXIST
)
XX
(
CF_SCALABLEONLY
)
XX
(
CF_TTONLY
)
XX
(
CF_NOFACESEL
)
XX
(
CF_NOSTYLESEL
)
XX
(
CF_NOSIZESEL
)
XX
(
CF_SELECTSCRIPT
)
XX
(
CF_NOSCRIPTSEL
)
XX
(
CF_NOVERTFONTS
)
#undef XX
{
0
,
NULL
},
};
static
void
_dump_cf_flags
(
DWORD
cflags
)
{
int
i
;
for
(
i
=
0
;
cfflags
[
i
].
name
;
i
++
)
if
(
cfflags
[
i
].
mask
&
cflags
)
MESSAGE
(
"%s|"
,
cfflags
[
i
].
name
);
MESSAGE
(
"
\n
"
);
}
/***********************************************************************
* ChooseFont16 (COMMDLG.15)
...
...
@@ -95,6 +139,9 @@ BOOL16 WINAPI ChooseFont16(LPCHOOSEFONT16 lpChFont)
TRACE
(
"ChooseFont
\n
"
);
if
(
!
lpChFont
)
return
FALSE
;
if
(
TRACE_ON
(
commdlg
))
_dump_cf_flags
(
lpChFont
->
Flags
);
if
(
lpChFont
->
Flags
&
CF_ENABLETEMPLATEHANDLE
)
{
if
(
!
(
template
=
LockResource16
(
lpChFont
->
hInstance
)))
...
...
@@ -212,6 +259,8 @@ BOOL WINAPI ChooseFontA(LPCHOOSEFONTA lpChFont)
COMDLG32_SetCommDlgExtendedError
(
CDERR_LOADRESFAILURE
);
return
FALSE
;
}
if
(
TRACE_ON
(
commdlg
))
_dump_cf_flags
(
lpChFont
->
Flags
);
if
(
lpChFont
->
Flags
&
(
CF_SELECTSCRIPT
|
CF_NOVERTFONTS
|
CF_ENABLETEMPLATE
|
CF_ENABLETEMPLATEHANDLE
))
FIXME
(
": unimplemented flag (ignored)
\n
"
);
...
...
@@ -230,6 +279,9 @@ BOOL WINAPI ChooseFontW(LPCHOOSEFONTW lpChFont)
LPCVOID
template
;
HANDLE
hResInfo
,
hDlgTmpl
;
if
(
TRACE_ON
(
commdlg
))
_dump_cf_flags
(
lpChFont
->
Flags
);
if
(
!
(
hResInfo
=
FindResourceA
(
COMMDLG_hInstance32
,
"CHOOSE_FONT"
,
RT_DIALOGA
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_FINDRESFAILURE
);
...
...
@@ -802,6 +854,8 @@ static LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
s
.
hWnd2
=
GetDlgItem
(
hDlg
,
cmb3
);
s
.
lpcf32a
=
lpcf
;
EnumFontFamiliesA
(
hdc
,
str
,
FontStyleEnumProc
,
(
LPARAM
)
&
s
);
SendDlgItemMessageA
(
hDlg
,
cmb2
,
CB_SETCURSEL
,
0
,
0
);
SendDlgItemMessageA
(
hDlg
,
cmb3
,
CB_SETCURSEL
,
0
,
0
);
SetCursor
(
hcursor
);
}
if
(
!
(
lpcf
->
Flags
&
CF_PRINTERFONTS
&&
lpcf
->
hDC
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment