GUI ScreenIO for Windows |
The ChooseFont API launches the Choose Font common dialog which allows the user to select one of the fonts installed on the system.
The use of the ChooseFont API is beyond the scope of a typical GUI ScreenIO application. ChooseFont is used by the GUI ScreenIO panel editor but is of limited use to you in your application, since you can't change fonts on panels at run time using this API.
See the Microsoft Windows documentation if you intend to use this API.
This may be useful for applications doing low-level printing applications.
No issues; this API will behave as if it were running locally on the client.
Files available to copy to your system:
COPY WIN32API.
CHOOSEFONT-PARMS
|
Instance handle of your application, from your main panel.
Handle of the owner window; panel-HWND.
Flags used to initialize the font dialog box.
A combination of bit flags that specify various options used to initialize the common dialog.
You OR these values to specify the bit values used for CHOOSEFONT-FLAGS. You can ADD them together, but you must be certain that the addition does not result in a carry, which would not set the desired bits.
You assign these values like this:
CF-EFFECTS PIC 9(9) COMP-5 VALUE H'00000100'. |
Flag | Value | Description |
CF-EFFECTS | 100h | Offers strikeout, underline, colors |
CF-FIXEDPITCHONLY | 4000h | Shows only fixed pitch fonts. |
CF-INITTOLOGFONTSTRUCT | 0040h | Use LOGFONT values to initialize. |
CF-NOSCRIPTSEL | 800000h | Disables the Script combobox. |
CF-NOVERTFONTS | 1000000h | List only horizontal fonts. |
CF-PRINTERFONTS | 2h | List printer fonts (requires hDC for the printer) |
CF-SCREENFONTS | 1h | List screen fonts. |
CF-TTONLY | 40000h | List only TrueType fonts. |
Size of the selected font, in units of 1/10 of a point.
Type of selected font.
If CF_EFFECTS is set, this is the text color.
Height of the font's character cell, in logical units.
Average width of the font's characters, in logical units.
Angle of the escapement vector and x-axis of the device.
Angle, in tenths of a degree, between each character's baseline and the x-axis of the device.
Weight of the font in the range 0 to 100.
If TRUE, specifies an italic font.
If TRUE, specifies an underline font.
If TRUE, specifies an underline font.
Specifies the character set.
Specifies the output precision.
Specifies the pitch and family of the font.
Facename of the font.
Specifies the output quality of the font.
This argument is standard for all CALLs to GSWINAPI. It is used to select the desired API or function, and to return the status of the operation.
Used to return the status of a call to GSWINAPI. A value of zero is a failure, any other value indicates success.
Recommended usage is to test the 88-level value WIN32API to see if it worked, then to use the text error message to see why it failed.
* ------------------------: If function failed,
|
Error code that was returned by Windows. This is not generally useful unless you have the Windows Platform SDK documentation available to you.
Plain-text error message that describes why the operation failed.
The number of these present varies depending on how many arguments are used by the desired function. These are not used, but must be present because this CALL requires seven arguments.
© 2000-2019 Norcom, all rights reserved |