BCX_FONTDLG function
Purpose: BCX_FONTDLG function creates a Font dialog box in which attributes for a logical font can be chosen. These attributes include a typeface name, style (bold, italic, or regular), point size, effects (underline, strikeout, and text color), and a script(or character set).
Syntax: RetVal% = BCX_FONTDLG(UseLast, hWnd) Parameters:
|
BCX_FONTDLG also creates a BCX_FONT structure populated with the following members with values derived from the choices made in the font dialog box.
See below for an example of how to retrieve these values.
Example:
DIM RetVal% RetVal% = BCX_FONTDLG ' Fill the BCX_FONT structure PRINT "BCX_Font.Name$ = ", BCX_Font.Name$ ' Font Name PRINT "BCX_Font.Size =" , BCX_Font.Size ' Font Point Size PRINT "BCX_Font.Italic =" , BCX_Font.Italic ' Boolean(0 or 1) PRINT "BCX_Font.Bold =" , BCX_Font.Bold ' Boolean(0 or 1) PRINT "BCX_Font.Underline =" , BCX_Font.Underline ' Boolean(0 or 1) PRINT "BCX_Font.Strikeout =" , BCX_Font.Strikeout ' Boolean(0 or 1) PRINT "BCX_Font.Rgb =" , BCX_Font.Rgb ' RGB font color
FontDialogDemo.bas is a complete program demonstrating the use of the BCX_FONTDLG function.