Hi, i know how to bold some text in a Richedit control using SetSelectionCharFormat(). But i'm not sure how to find out whether a selected text is bold and remove the bold. Please help. Thx.
Printable View
Hi, i know how to bold some text in a Richedit control using SetSelectionCharFormat(). But i'm not sure how to find out whether a selected text is bold and remove the bold. Please help. Thx.
CRichEditCtrl::GetSelectionCharFormat looks to be a safe bet - ie. use the 'get' method to determine whether it is or not and the 'set' method to change it; you might just want to just use the 'set' method exclusively if you know you're going to be changing the selection to give it specific, known attributes.