Changing the Fill Character of the Window

The window fill character, which defaults to a space, is used when clearing the entire window with the function wn_clr(), and, if the CLRENDROW option is on, when clearing to the end of the row after writing to the window. The fill character does not affect spaces embedded in strings written to the window. The fill character can be used, for example, to provide a lightly shaded background for the window on systems that support the block graphics characters used for shading. You can change the window fill character at any time by calling the set window fill character function, sw_fillchar():

sw_fillchar(ch, wnp)
 
UCHAR ch;
/* Character 
*/
WINDOWPTR wnp;
/* Pointer to window
*/

For example, to provide a lightly-shaded background, use the following code fragment:

sw_fillchar(CH_LIGHTSHADE, wnp);

Changing the fill character does not affect the current contents of the window buffer. To update the window buffer with the new fill character, call wn_clr(). wn_clr() removes any existing text in the window, so it is advisable to change the fill character before writing any text to the window.


Home Contents Previous Next