CEdit box with variable fonts
I want to change the fonts of the text in my mutli-line editbox. I've found how to change the default font of the entire control, but it is possible to just change one line to either bold or underline? If so, how?
For example: I currently write to the editbox like this:
CString textstr = "hello world\r\nFoobar";
CEdit * Editbox1 = (CEdit*) GetDlgItem(IDC_EDIT1);
Editbox1 ->SetWindowText(textstr);
How would I make "Foobar" bold, and "hello world" regular?
Re: CEdit box with variable fonts
I think that isn't possible. You may use rich control, in which you can format your text.
Re: CEdit box with variable fonts
how do I do that with visual c++ 6.0?
Re: CEdit box with variable fonts
Quote:
Originally Posted by
acerunner316
how do I do that with visual c++ 6.0?
replace your CEdit with a CRichEditCtrl
Re: CEdit box with variable fonts
i mean how do you select certain portions of the text to be a specific font?
CRichEditCtrl uses SetFont() but that sets the entire control to that font.