WxW
asked on
RichEdit Font
I need to change the font used by a RichEdit . What's the procedure ? (Basically I need to change only the font size)
Also do you have any idea why EM_SETSEL(-1,-1) selects all the text , instead putting the cursor at the end ? ( I use RichEdit 2.0 )
Thanks
Also do you have any idea why EM_SETSEL(-1,-1) selects all the text , instead putting the cursor at the end ? ( I use RichEdit 2.0 )
Thanks
ASKER
No I need the API procedure , because I have created the rich edit control using the Windows API and not visual objects | classes
ASKER
Basically I do not find any HFONT - relative entry in the CHARFORMAT structure ....
ASKER
Um - You were right I found it in CharFormat2
Please send an answer so I award it
And Thanks
Please send an answer so I award it
And Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can also use EM_SETCHARFORMAT to change a selection's font to something.
If you want to move the caret to the end, use
int length = GetWindowTextLength();
EM_SETSEL(length, length);