CdlCFConstants enumeration

Options of the Font dialog, combined with Or in the Flags property.

The enumeration is declared inside the CommonDialog class. Its members are used without a qualifier, or with the name of the enumeration. The values are those of the Windows CF_ constants of the CHOOSEFONT structure.

The class always adds the Windows flag that makes the dialog start from the font properties (CF_INITTOLOGFONTSTRUCT), and, when the HookEvents property is True, the one that switches on its hook procedure (CF_ENABLEHOOK). It removes both from Flags when the dialog closes, so they are not members. The dialog returns the CdlCFNo...Sel flags to say which parts the user did not select; ShowFont then leaves the matching property as it was.

Member Value Description
CdlCFScreenFonts &H1 Lists the fonts that the screen supports.
CdlCFPrinterFonts &H2 Lists the fonts that a printer supports.
CdlCFHelpButton &H4 Shows a Help button. A click raises the Help event, but only when the dialog has an owner window.
CdlCFEffects &H100 Shows the Strikeout and Underline check boxes and the color list. Only with this flag does the class update FontStrikethru, FontUnderline and Color.
CdlCFApply &H200 Shows an Apply button. A click raises the FontApply event, which needs HookEvents True.
CdlCFScriptsOnly &H400 Lists the fonts of the non-OEM character sets, the Symbol set and the ANSI set.
CdlCFNoVectorFonts &H800 Does not allow vector fonts.
CdlCFLimitSize &H2000 Limits the sizes to the range from Min to Max points. Without this flag the dialog ignores both properties.
CdlCFFixedPitchOnly &H4000 Lists only fixed-pitch (monospaced) fonts.
CdlCFForceFontExist &H10000 The dialog shows an error message when the user enters a font or a style that does not exist.
CdlCFScalableOnly &H20000 Lists only scalable fonts, which include vector, TrueType and OpenType fonts.
CdlCFTTOnly &H40000 Lists only TrueType fonts.
CdlCFNoFaceSel &H80000 No font name is selected when the dialog opens. The dialog returns the flag when the user chose no name, and the class then leaves FontName unchanged.
CdlCFNoStyleSel &H100000 No style is selected when the dialog opens. The dialog returns the flag when the user chose no style, and the class then leaves FontWeight and FontItalic unchanged.
CdlCFNoSizeSel &H200000 No size is selected when the dialog opens. The dialog returns the flag when the user chose no size, and the class then leaves FontSize unchanged.
CdlCFSelectScript &H400000 Lists only the fonts of the character set in FontCharset. The user cannot change the character set in the Script box.
CdlCFNoScriptSel &H800000 Disables the Script box. The dialog returns the flag when the user chose no character set, and the class then leaves FontCharset unchanged.
CdlCFNoVertFonts &H1000000 Does not list the vertical fonts, those with a name that starts with @.

Used by

See Also