The information in this article applies to:
SUMMARY
The common dialog box library (COMMDLG.DLL) provides the ChooseFont()
routine that provides a common interface (Font dialog box) to specify the
attributes for a font in an application. When the user chooses the Apply
button in the Font dialog box, the application can format selected text
using the specified font. This button is also useful in an application that
allows the user to select more than one font simultaneously.
MORE INFORMATION
The Font dialog box includes an Apply button if the application includes
the CF_APPLY value in the specification for the Flags member of the
CHOOSEFONT data structure. The dialog box includes the Color combo box if
the CF_EFFECTS value is also specified. The remainder of this article
assumes that the application has specified both of these values.
steps adding hook functionThe following code illustrates one method to process input from the Apply button:
The color information is not required to create the font; however, this
information is required to accurately display the font according to the
user's specification.
In an application that does not use the Apply button, the rgbColors member of the CHOOSEFONT data structure contains the selected color. In this case, no special processing to retrieve the color is required. Additional query words:
Keywords : kbCmnDlg kbCmnDlgFont kbGrpUser kbWinOS310 kbWinOS300 |
Last Reviewed: December 3, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |