SetFontPopupDefaultsEx
int SetFontPopupDefaultsEx (char typefaceName[], int bold, int underline, int strikeOut, int italic, int justification, int textColor, int angle, int characterSet, int fontSize);
Purpose
Specifies the settings to apply to a font pop-up dialog box when a user clicks the Default button. Open a font pop-up dialog box using FontSelectPopup or FontSelectPopupEx. SetFontPopupDefaultsEx is similar to SetFontPopupDefaults, except that you also can specify defaults for text angle and character set using SetFontPopupDefaultsEx.
This function applies to all attributes that affect the sample text display, even attributes for which the controls have been hidden.
The default values you set with this function or SetFontPopupDefaults apply to subsequent calls to FontSelectPopup or FontSelectPopupEx.
If you do not specify your own default values, the font pop-up dialog box uses the default values shown in the following table.
Font Pop-Up Defaults | Initial Settings |
typefaceName | VAL_DIALOG_FONT |
bold | 0 |
underline | 0 |
strikeOut | 0 |
italic | 0 |
justification | VAL_LEFT_JUSTIFIED |
textColor | VAL_BLACK |
angle | 0 |
charSet | VAL_NATIVE_CHARSET |
fontSize | 12 |
LabWindows/CVI maintains a separate set of font pop-up dialog box default values for each thread of your program.
Parameters
Input | ||
Name | Type | Description |
typefaceName | char [] | Default typeface name, such as Courier, used in the font pop-up dialog box. |
bold | int | Specify a nonzero value or select On in the function panel to enable bold text as a default font setting. Specify 0 or select Off in the function panel otherwise. |
underline | int | Specify a nonzero value or select On in the function panel to enable underlined text as a default font setting. Specify 0 or select Off in the function panel otherwise. |
strikeOut | int | Specify a nonzero value or select On in the function panel to enable strikeout text as a default font setting. Specify 0 or select Off in the function panel otherwise. |
italic | int | Specify a nonzero value or select On in the function panel to enable italic text as a default font setting. Specify 0 or select Off in the function panel otherwise. |
justification | int | Default justification setting used in the font pop-up dialog box. |
textColor | int | Default text color setting used in the font pop-up dialog box. Specify the color in RGB format. An RGB value is a 4-byte integer with the hexadecimal format 0x00RRGGBB. RR, GG, and BB are the respective red, green, and blue components of the color value. |
angle | int | Default angle used in the font pop-up dialog box. Specify angle in tenths of a degree. |
characterSet | int | Default character set used in the font pop-up dialog box. |
fontSize | int | Default font size used in the font pop-up dialog box. |
Return Value
Name | Type | Description |
status | int | Return value indicating whether the function was successful. A negative number indicates that an error occurred. |
Additional Information
Library: User Interface Library
Include file: userint.h
LabWindows/CVI compatibility: LabWindows/CVI 9.0 and later