Writing a Column of Characters

A function is provided to write a certain character-attribute pair, a certain character, or a certain attribute in columns. You can use this function to fill an area of the window with a block graphic character or highlight part of a window with a certain attribute.

To write a column of characters using the window attribute, use the video column quantity of characters with attribute function, v_chattcol():

int v_chattcol(wn_row, wn_col, ch, att, q, mv_type, wnp)
int wn_row; /* Row of window to start writing at */
int wn_col; /* Column of window to start writing at */
UCHAR ch; /* Character to write */
UCHAR att; /* Attribute to use to write character */
int q; /* Quantity of characters to write */
int mv_type; /* Type of move: CH, CHATT, ATT */
WINDOWPTR wnp; /* Pointer to window to write to */

For the argument q, you can specify a number, or ENDCOL to write characters to the end of the current column, or ENDWN to fill the rest of the window buffer with the specified character.

The type of move, mv_type, is interpreted as described above in v_chattrow().

Output starts at specified position and continues on the column until the specified number of characters is written. If the end of the column is reached and there are still more characters to write, output goes to the beginning of the next column. When the end of the window buffer is reached, output stops. The window write options are not respected, so no scrolling occurs and the virtual cursor does not move.

v_chattcol() returns the number of characters left to write. If 0 is returned, the specified number of characters were written.


Home Contents Previous Next