Reputation: 420
I learnt today that the Clear() method of CRichEditCtrl only works when the control is not read only. I want to be able to restore the existing read only status once I've cleared the contents, but I don't see a way of checking the status in the first place. I could of course keep track of when it's being set to read only, but it'd be nice to be able to query it directly. Is there a way of doing this?
Thanks
Upvotes: 0
Views: 192
Reputation: 15385
Use GetStye:
bool bReadOnly = (m_wndRTFEdit.GetStyle() & ES_READONLY)!=0;
Upvotes: 1