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.
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.
GameJolt: https://gamejolt.com/@KasunL
Game Development Youtube: https://is.gd/XyhYoP
Amateur IT Blog: http://everything-geeky.blogspot.com/
(and, sorry for my amateur English)
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.
CProgramming FAQ
Caution: this person may be a carrier of the misinformation virus.