2

It should be an easy question but I was unable to find an answer on google: How to set a default font and color to a richedit using plain c++ and win32 ?

2 Answers 2

3

From MSDN:

You can also use EM_SETCHARFORMAT and EM_GETCHARFORMAT messages to set and retrieve the character formatting of the insertion point, which is the formatting that is applied to any subsequently inserted characters. For example, if an application sets the default character formatting to bold and the user then types a character, that character is bold.

Is that what you're looking for?

2

From MSDN also

Rich Edit 4.1: To set the default font for a script, call EM_SETCHARFORMAT with CHARFORMAT2, specifying values for the yHeight, bCharSet, bPitchAndFamily, szFaceName, and lcid members. Also, to get the default font for a specific code page, call EM_GETCHARFORMAT with CHARFORMAT2, specifying values for the bCharSet and lcid members.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.