1. RE: Writing text in colors

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C205CE.F53A8490
 charset=iso-8859-1



> -----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.

==================================================================
De informatie opgenomen in dit bericht kan vertrouwelijk zijn en 
is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht 
onterecht ontvangt wordt u verzocht de inhoud niet te gebruiken en 
de afzender direct te informeren door het bericht te retourneren. 
==================================================================
The information contained in this message may be confidential 
and is intended to be exclusively for the addressee. Should you 
receive this message unintentionally, please do not use the contents 
herein and notify the sender immediately by return e-mail.


==================================================================

------_=_NextPart_000_01C205CE.F53A8490
Content-Type: application/ms-tnef

new topic     » topic index » view message » categorize

2. RE: Writing text in colors

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 message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu