Using Intel® Visual Fortran to Create and Build Windows*-Based Applications

ID 757211
Date 7/23/2021
Document Table of Contents
Give Feedback

Displaying Character-Based Text

The routines in the following table ask about screen attributes that affect text display, prepare the screen for text and send text to the screen. To print text in specialized fonts, see Displaying Font-Based Characters and Using Fonts from the Graphics Library Overview.

In addition to these general text routines, you can customize the text in your menus with MODIFYMENUSTRINGQQ. You can also customize any other string that QuickWin produces, including status bar messages, the state message (for example, "Paused" or "Running"), and dialog box messages, with SETMESSAGEQQ. Use of these customization routines is described in Customizing QuickWin Applications Overview.

The following routines recognize text-window boundaries:




Clears the screen, viewport, or text window


Sets the cursor on or off


Returns the current background color index


Returns the current background Red-Green-Blue color value


Returns the current text color index


Returns the current text Red-Green-Blue color value


Returns the current text-output position


Returns the boundaries of the current text window


Sends text to the screen at the current position


Scrolls the contents of a text window


Sets the current background color index


Sets the current background Red-Green-Blue color value


Sets the current text color to a new color index


Sets the current text color to a new Red-Green-Blue color value


Changes the current text position


Sets the current text-display window


Turns line wrapping on or off

These routines do not provide text-formatting capabilities. If you want to print integer or floating-point values, you must convert the values into a string (using an internal WRITE statement) before calling these routines. The text routines specify all screen positions in character-row and column coordinates.

SETTEXTWINDOW is the text equivalent of the SETVIEWPORT graphics routine, except that it restricts only the display area for text printed with OUTTEXT, PRINT, and WRITE.GETTEXTWINDOW returns the boundaries of the current text window set by SETTEXTWINDOW. SCROLLTEXTWINDOW scrolls the contents of a text window.OUTTEXT, PRINT, and WRITE display text strings written to the current text window.


The WRITE statement sends its carriage return (CR) and line feed (LF) to the screen at the beginning of the first I/O statement following the WRITE statement. This can cause unpredictable text positioning if you mix the graphics routines SETTEXTPOSITION and OUTTEXT with the WRITE statement. To minimize this effect, use the backslash ( \ ) or dollar sign ( $ ) format descriptor (to suppress CR-LF) in the associated FORMAT statement.

See more information on routines mentioned here, see the routine descriptions in the Language Reference.