RE: Writing text in colors

new topic     » goto parent     » topic index » view thread      » older message » newer message

Thanks for your ideas everyone. I'm not sure I know how to relate the 
C++ code to Euphoria and specially Win32Lib. i tried setPenBkMode() but 
it doesn't really help. The setWindowBackColor() & setText() combo seems 
best as setText writes the whole area, and setWindowBackColor gives me 
the background I want. I have reduced the amount I write as a help 
measure and so far it looks OK. No getDC... failures in a while, but it 
always takes time. ...

Can't help wondering if there is a Windows resource freeing process in 
the background that can't keep up if you write too much too quickly?

Anyway, thanks.

Derek Parnell wrote:
> 
> 
> > -----Original Message-----
> > From: Andy Drummond [mailto:kestrelandy at xalt.co.uk]
> > Sent: Monday, 27 May 2002 23:23
> > To: EUforum
> > Subject: Writing text in colors
> > 
> > 
> > 
> > I posted a problem with getDC:SaveDC() recently, and was advised to 
> > avoid using graphics routines - like, I suspect, setText(). i trued 
> > Win32Lib v0.57.6 but that doesn't help and is veerrryyyy 
> > sllooowwwww at 
> > times or in some routines. wPuts() & wPrintf() are nasty - they leave 
> > the rest of the text box with its old text, and use the 
> > system default 
> > background. I can't seem to get around these - so please can someone 
> > advise me what is a basically simple Windows task:
> > 
> > I want to write text, over & over again, into the same text box 
> > controls, in different foreground OR background color without the 
> > resources getting eaten up like they are when I use 
> > setWindowBkColor() 
> > and setText().
> > 
> > Anyone with a working technique (should be easy!!!) i will buy a beer 
> > when I see them!
> > 
> 
> Have you tried  setPenBkMode(id, OPAQUE) ?
> 
> This is supposed to cause the text to use the current background color. 
> Of
> course you have to use spaces to clear to end-of-line.
> 
> --------
> Derek.
> 
> ==================================================================
> 
> 
> ==================================================================
> 
> 
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu