Admin Production ni-theme
Current Publication

SetFontPopupDefaults

LabWindows/CVI

SetFontPopupDefaults

int SetFontPopupDefaults (char typefaceName[], int bold, int underline, int strikeOut, int italic, int justification, int textColor, int fontSize);

Purpose

Note Note  This function has been superseded by SetFontPopupDefaultsEx. Use SetFontPopupDefaultsEx to set values for Angle and Character Set.

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.

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 SetFontPopupDefaultsEx 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
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.
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 4.0 and later