Flags Property (Font Dialog)

Applies To

Common dialog1H1HYJI.

Description

Sets the options for the Font dialog box.

Usage

[form.]CMDialog.Flags[ = flag ]

Remarks

The following constants are available for the Font dialog box:

Constant

Value

Description

 

CF_APPLY

 &H200&

Specifies that the dialog box should enable the Apply button.

CF_ANSIONLY

&H400&

Specifies that the dialog box should allow only a selection of the fonts that use the Windows character set. If this flag is set, the user will not be able to select a font that contains only symbols.

CF_BOTH

&H3&

Causes the dialog box to list the available printer and screen fonts. The hDC property identifies the device context associated with the printer.

CF_EFFECTS

&H200&

Specifies that the dialog box should enable strikethrough, underline, and color effects.

CF_FIXEDPITCHONLY

&H4000&

Specifies that the dialog box should select only fixed-pitch fonts.

CF_FORCEFONTEXIST

&H10000&

Specifies that an error message box is displayed if the user attempts to select a font or style that does not exist.

CF_LIMITSIZE

&H2000&

Specifies that the dialog box should select only font sizes within the range specified by the Min and Max properties.

CF_NOSIMULATIONS

&H1000&

Specifies that the dialog box should not allow GDI (graphic device interface) font simulations.

CF_NOVECTORFONTS

&H800&

Specifies that the dialog box should not allow vector-font selections.

CF_PRINTERFONTS

&H2&

Causes the dialog box to list only the fonts supported by the printer, specified by the hDC property.

CF_SCALABLEONLY

&H20000&

Specifies that the dialog box should allow only the selection of fonts that can be scaled.

CF_SCREENFONTS

&H1&

Causes the dialog box to list only the screen fonts supported by the system.

CF_SHOWHELP

&H4&

Causes the dialog box to display a Help button.

CF_TTONLY

&H40000&

Specifies that the dialog box should allow only the selection of TrueType fonts.

CF_WYSIWYG

&H8000&

Specifies that the dialog box should allow only the selection of fonts that are available on both the printer and the display. If this flag is set, the CF_BOTH and CF_SCALABLEONLY flags should also be set.

 

These flags are defined in the file CONSTANT.TXT.

You can also define selected flags.  Use the Const keyword in the Declarations section of the startup form to define the flags you want to use.  For example:

Const OFN_READONLY  = &H00000001&
Const CF_EFFECTS    = &H00000100&

 

You can set more than one flag for a dialog box using the Or operator.  For example:

CMDialog1.Flags = &H10& Or &H200&

 

Adding the desired constant values produces the same results.  The following is equivalent to the preceding example:

CMDialog1.Flags = &H210&

Data Type

Long103F6YL