TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: George White
from: Jonathan de Boyne Pollard
date: 1999-11-03 09:49:25
subject: PROMPT $I in PMCMD

 JdBP>> Actually, what I need to do is to write a control window that
 JdBP>> can be used to display coloured text, rather than relying on a
 JdBP>> standard MLE control.  I know that these things can be done,
 JdBP>> because programs like ZOC and LiveWire use such controls for
 JdBP>> terminal emulator windows.  Does anyone know how they do it ?
 JdBP>> I've tried rolling my own, but it is *very* slow in repainting
 JdBP>> (all of those calls to GpiCharStringPosAt() take a long time).

 GW> I seem to remember that a way to do this was to hide the window,
 GW> build the text, and then make it visible.

That isn't the solution.  The text is already "built", in an internal logical
screen buffer.  The problem is that the raw GPI call to actually paint the
character cells onto the device context is slow, and that often many
characters, in different combinations of colours, have to be redrawn during a
WM_PAINT event when the window contents are being redisplayed.

Does anyone here in OS2PROG have any suggestions ?

 ¯ JdeBP ®

--- FleetStreet 1.22 NR
292/854
* Origin: JdeBP's point, using Squish (2:257/609.3)

SOURCE: echoes via The OS/2 BBS

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.