Changing the Definition of a Logical Attribute

To change the monochrome or color definition of a logical attribute, you can either: (1) change or add to the entries in the system logical attribute table, _att_tbl[ ][ ], which is contained in vv_main.h, (2) modify logical attributes at run-time, or (3) use the Designer to modify the logical attributes used by a Designer library.

To change the entries in the system logical attribute table, modify the header file vv_main.h. For example, the row in the table for LNORMAL now reads:

{NORMAL, catt_def(WHITE, BLUE)},    /* LNORMAL            */

Column 0, used for monochrome modes, contains the monochrome attribute NORMAL. Column 1, used for color modes, contains the foreground color WHITE and the background color BLUE. The function catt_def() converts the two colors into the appropriate physical attribute byte to use to create a white on blue color. The calling convention for the color attribute definition function, catt_def(), is as follows:

UCHAR catt_def(fg_att, bg_att)
 
UCHAR fg_att;
/* Physical attribute for foreground color
*/
UCHAR bg_att;
/* Physical attribute for background color
*/

To change LNORMAL so that it appears as high-intensity normal in monochrome and GREEN on RED in color modes, make the LNORMAL line read:

{NORMAL | HIGH_INT, catt_def(GREEN, RED)},  /* LNORMAL                */

You can change the monochrome or color attributes for any logical attribute in similar fashion.


Home Contents Previous Next