This function lets you create a character font that is managed as a COM interface.
In practice, this function lets you provide a control in a Visual Adelia window created by including an ActiveX with an IDispatch interface pointer that supports the desired font.
Context
Windows client.
Parameters
ALPHA(n) |
Enter |
FontName |
Name of the desired font. |
NUM_E (8,2) |
Enter |
Size |
Font size. |
BOOL |
Enter |
Bold |
Bold or non-bold style. |
BOOL |
Enter |
Italics |
Italics or non-italics style. |
BOOL |
Enter |
Underlined |
Underlined or non-underlined style. |
BOOL |
Enter |
Strikethrough |
Strikethrough or non-strikethrough style. |
NUM_BIN_2 |
Enter |
Script |
Font script. |
POINTER *IDispatch |
Output |
pDispFont |
IDispatch interface pointer pointing to the created font, or *NULL in case of failure. |
NUM_BIN_4 |
Output |
ReturnCode |
Return code for the operation: 0 : Operation completed successfully. Other value: Unexpected system error. |
Example
Creating a Times New Roman font in size 10 with the bold and underlined styles.
ALPHA(50) FontName
NUM_E(8,2) Size
POINTER pDispFont *IDispatch
FontName = 'Times New Roman'
Size = 10
pDispFont = *NULL
CALL_DLL 'VaToolBx.Dll' 'VaToolBxCreateFont' FontName Size *TRUE *FALSE *TRUE *FALSE 0 pDispFont ReturnCode
Note:
The size, style and script must be compatible with the chosen font. The Windows system font selection dialog box, accessible via the Properties pages of a graphical object in a Visual Adelia window, provides a guide for selecting coherent values.