nacer@hpmcaa.mcm.hp.com (Abdenacer Moussaoui) (11/28/89)
API does not provide a "sequential" write procedure (ie. write to the
screen from the last cursor position using a specified color). API
VioWrtTTY() comes short of what I want to do so I decided to write the
following macro. However it does not seem to work apparently
VioWrtCharStrAtt() does not seem to move the cursor like VioWrtTTY does.
Am I doing this write? Is there a work around using strictly APIs?
Thank you.
#define VioWrtTtyAtt( \
buf, \
buflen, \
attr, \
handle ) \
{ USHORT usLin, usCol ; \
VioGetCurPos( &usLin, &usCol, 0 ) ; \
VioWrtCharStrAtt( buf, buflen, usLin, usCol, attr, handle ); \
} \
/*_11/22/1989______________________________________________________________*/
BTW. I am not interested in supporting TTY escape sequences
rstevahn@hpdml93.HP.COM (Robert Stevahn) (11/29/89)
I haven't tried this, but how about something like:
#define VioWrtTTYAtt (
buf,
len,
attr,
handle)
{USHORT usLin, usCol;
VioGetCurPos (&usLin, &usCol, 0);
VioWrtTTY (buf, len, handle);
VioWrtNAttr (&attr, len, usLin, usCol, handle);
}
In other words, remember the current position, use the TTY call which updates
the cursor, and then write out the attributes. Hope it works...