![]() #WHERE IS THE FONT DIALOG BOX LAUNCHER WINDOWS#Set the CF_NOSCRIPTSEL flag to disable the Scripts combo box, or set the CF_SELECTSCRIPT flag to restrict selections in the Scripts combo box to a specified character set.Ĭustomizing the Font Dialog Box on earlier versions of Windows.To restrict or disable the Scripts combo box Set the CF_LIMITSIZE flag to restrict the user to specifying point sizes in the range specified by the nSizeMin and nSizeMax members.Set the CF_FORCEFONTEXIST flag to restrict the user to specifying only valid typeface names, styles, and point sizes listed in the dialog box.To restrict the typeface names, styles, and point sizes that the user can specify To remove the restriction, set the CF_INACTIVEFONTS flag. Starting with Windows 7, the list of fonts displayed in the dialog box is restricted based on the user's shown fonts. You can also restrict the available styles that the dialog box displays for some fonts by using the CF_NOSIMULATIONS value. Set any combination of the CF_TTONLY, CF_FIXEDPITCHONLY, CF_NOVECTORFONTS, CF_NOVERTFONTS, CF_SCALABLEONLY, and CF_WYSIWYG flags.To restrict the fonts displayed in the dialog box The hwndOwner member must identify the window to receive the HELPMSGSTRING registered message when the user clicks the Help button. The hook procedure can send the WM_CHOOSEFONT_GETLOGFONT message to the dialog box to retrieve the address of the LOGFONT structure that contains the current selections for the font. Set the CF_APPLY flag and provide a hook procedure to process WM_COMMAND messages for the Apply button.The style name may change depending on the system user interface language. To globalize your application, specify the style by using the lfWeight and lfItalic members of the LOGFONT structure that is pointed to by lpLogFont. Set the CF_USESTYLE flag and use the lpszStyle member to specify the style name.To initialize the Font Style control to a specified style name These values will also be set in Flags when ChooseFont returns, if the user did not select a corresponding value. This is useful when you are working with a selection of text that has more than one typeface, style, or point size. You can also use the CF_NOFACESEL, CF_NOSTYLESEL, and CF_NOSIZESEL flags to prevent the Font dialog box from displaying initial values for the corresponding controls.Set the CF_INITTOLOGFONTSTRUCT flag in the Flags member, along with members of the LOGFONT structure that is pointed to by the lpLogFont, to specify the initial values for the font attributes.To specify the initial values for the Font, Font Style, Size, Strikeout, and Underline dialog box controls:.To specify the initial values for the Font, Font Style, Size, Strikeout, and Underline dialog box controls: You can use the rgbColors member of the CHOOSEFONT structure to specify an initial font color. To display the controls that allow the user to select strikeout, underline, and color options: ![]() You can use the Flags member to enable or disable some of the Font dialog box controls, and you can use the Flags member in conjunction with other CHOOSEFONT members to control the initial values of some controls. However, the CF_PRINTERFONTS flag retains one function: to display the font type description label at the bottom of the Font dialog box. Starting with Windows 7, the CF_PRINTERFONTS, CF_SCREENFONTS, CF_BOTH, and CF_WYSIWYG flags are no longer used by the ChooseFont function for font enumeration. If the CF_PRINTERFONTS or CF_BOTH flag is set, the font type description label appears at the bottom of the Font dialog box. If you specify CF_PRINTERFONTS or CF_BOTH, the hDC member of the CHOOSEFONT structure must specify a handle to a device context for the printer. Customizing the Font Dialog Box on Windows 7īefore calling ChooseFont, the Flags member of the CHOOSEFONT structure must specify CF_SCREENFONTS, CF_PRINTERFONTS, or CF_BOTH, to indicate whether the dialog box should list screen fonts, printer fonts, or both.Customizing the Font Dialog Box on earlier versions of Windows.The following topics are discussed in this section. You can determine the cause of an error by using the CommDlgExtendedError function to retrieve the extended error value. If the user cancels the Font dialog box or an error occurs, ChooseFont returns FALSE and the contents of the LOGFONT structure are not defined. If the user clicks the OK button, the ChooseFont function returns TRUE and sets the information about the user's selection in the CHOOSEFONT structure. ![]() The following screen shot shows a typical Font dialog box. You create and display a Font dialog box by initializing a CHOOSEFONT structure and passing the structure to the ChooseFont function. ![]() The Font dialog box lets the user choose attributes for a logical font, such as font family and associated font style, point size, effects (underline, strikeout, and text color), and a script (or character set). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |