Hello, i used tutorial 35 (the last iczelion tutorial about the rich edit box), to make a text editor for win32 asm.

I have the following problem:
When i change the font in the richedit-box to (for exemple: courier new), the font of the collored text (the asm commands) doesn't change, so you get one type of font printed over the other.

I did try the get a different hdc. But it either didn't draw anything or it used the old font, so not the font the richedit box uses to print its text.

How can I overcome this problem

this is the link to the tutorial, (look at the NewRichEditProc)
http://win32assembly.online.fr/tut35.html

regards
pyr0_mathic
Posted on 2004-01-08 04:24:16 by pyr0_mathic

Hello, i used tutorial 35 (the last iczelion tutorial about the rich edit box), to make a text editor for win32 asm.

I have the following problem:
When i change the font in the richedit-box to (for exemple: courier new), the font of the collored text (the asm commands) doesn't change, so you get one type of font printed over the other.

I did try the get a different hdc. But it either didn't draw anything or it used the old font, so not the font the richedit box uses to print its text.

How can I overcome this problem

this is the link to the tutorial, (look at the NewRichEditProc)
http://win32assembly.online.fr/tut35.html

regards
pyr0_mathic



You must do a SelectObject,hdc,Font everytime before you Draw the new text, with the same font that you used to change the richedit control font.

I do a CreateFontIndirect,SendMessage width WM_SETFONT in the initialization on the application and a SelectObject everytime that it paints.
Posted on 2004-01-14 04:44:51 by Eternal Idol Birmingham