How do I change the font of an edit control in win32 API. I would like to be able to edit the style as well as the color of a font on a edit control.
First you should clarify that you're talking about a standard Edit control versus a Rich Edit control - the two are totally different.
You can change the font by sending a WM_SETFONT
message to the edit control. Setting the color is a totally different process.
You can set the text color by responding to the WM_CTLCOLOREDIT
message in the owner of the edit control.
You can send it a WM_SETFONT message. Be warned, though, as the link explains, you may have to re-size the control after changing the font.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With