Designer: The window attribute can be set with the Designer. See the Designer User's Guide for more information. You can also change the window attribute in your code at any point after you have read the window from the Designer library.
Code: You can change the window attribute at any time by calling the set window attribute function, sw_att():
|
||
|
|
|
|
|
|
where att is the logical attribute to use for the window. For Designer windows, specify a logical attribute that is in the logical attribute table for the library. For windows defined in code, specify a logical attribute from the system logical attribute table, or from the logical attribute table attached to the window, if you attached one.
sw_att() sets the attribute member in the window structure to the specified attribute. This new attribute will be used for subsequent writes to the window buffer. The background color of the window buffer and any text that was in the window's buffer before the attribute was changed will not be affected. However, if the CLRENDROW option is turned on when you write to the window, the new text appears in the new attribute, and the window buffer is cleared to the end of the row using the new attribute. This can produce a very strange appearance.
For consistent results, you may want to do one of the following:
|