Clearing All or Part of a Window

To clear a window (but leave the border and margins intact), use the window clear function, wn_clr():

void wn_clr(wnp)

WINDOWPTR wnp;        /* Pointer to window        */

The window will be cleared with the character and attribute specified in the window structure.

To clear only part of the window or to use a different character or attribute, use a window output function, such a v_chattrow();, v_chattcol(), or v_chattarea(). For example, to clear the row that the virtual cursor is on, call:

att = wnp->att;
/* Window attribute 
*/
row = wnp->r;
/* Current row of virtual cursor



*/
v_chattrow(row, 0, ' ', att, ENDROW, CHATT, wnp);
*/


Home Contents Previous Next