RE: richedit and non true type fonts

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

Derek Parnell wrote:
> ----- Original Message -----
> From: "Raudaun Long" <LilFreak02_ at hotmail.com>
> To: "EUforum" <EUforum at topica.com>
> Subject: richedit and non true type fonts
> 
> 
> > Any reason why if i set a richedit control to a non true type font, it
> > will appedText in that font until i send it a "\r\n" then it reverts any
> > new text to the default font?
> >
> 
> I cannot reproduce your problem. Here is the code I was using. What do 
> you
> get when you run this code, and does this code represent what you were
> trying to do?
> 
> ----------
>  include win32lib.ew
>  constant
>     Win = create( Window, "RichEdit Demo", 0, Default, Default, 400, 460,
> 0 ),
>     RE = create( RichEdit, "", Win , 20, 20, 360, 200, ES_NOHIDESEL)
>  appendText(RE, " Hello world 1 ")
>  setFont(RE, "ms sans serif", 20, Bold)
>  appendText(RE, " Hello world 2 ")
>  appendText(RE, {13,10})
>  appendText(RE, " Hello world 3 ")
>  WinMain(Win,0)
> 
> ----------------
> cheers,
> Derek Parnell
> 
> 

After looking through the win32lib source code and then again at my 
source code i noticed my code to update the font set the selection to 
the end of the control then changed the font. So when the font was first 
set, the change didn't affect the entire control only the new text. Not 
sure why it would change back to the default font after a carriage 
return-line feed but after i modified the code, the problem seems to 
have stopped.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu