• Welcome to Valhalla Legends Archive.
 

RichEdit and custom font dialog box

Started by Okee, December 14, 2004, 08:40 PM

Previous topic - Next topic

Okee

Sorry for the two posts of mine up top, but this question has been troubling me.
I'm currently using a RichEdit, well not really using because I'm just starting to work on the RichEdit/message output part of my bot, but I tried allowing custom fonts by using the Font Dialog Box and a CHOOSEFONT struct.  Now, I know you initialize the CHOOSEFONT struct and then pass it to the ChooseFont funct, by value, and it returns the selected settings to the CHOOSEFONT struct. My question is though, is this compatible with RichEdit? I couldn't get the RichEdit to display the settings I had set. I'm not sure which items within the CHOOSEFONT struct actually define what either. I only want the font name, size, color and bold/underline to be optional, so only those things need to be saved from the returned struct.

If this makes sense, any help would be greatful. Thanks.

UserLoser.

Not familiar with CHOOSEFONT, so I can't tell you.  But otherwise, you can use the CHARFORMAT structure to set the way the contents of your RichEdit will appear.  This allows you to set the font, style as bold, underlined, or italic, and even colored text, and more.

Okee

Can you use CHARFORMAT struct with a font dialog box? I would like the keep this part of my bot as system default looking as I can (ie i dont want to make my own font dialog, it wouldnt look how i want it to look)

warz

I never found a way to use CHARFORMAT with the Font Dialog box. CHOOSEFONT was too specific and annoying, also. I remember you would have to use CHOOSECOLOR also. Who cares about custom fonts, anyways. :-P

Eibro

Quote from: warz on December 16, 2004, 10:08 AM
I never found a way to use CHARFORMAT with the Font Dialog box. CHOOSEFONT was too specific and annoying, also. I remember you would have to use CHOOSECOLOR also. Who cares about custom fonts, anyways. :-P
No, color can be chosen on a CHOOSEFONT dialog if the right flags are set.
Eibro of Yeti Lovers.