开发者

RichEdit control: Determine when text is changed?

开发者 https://www.devze.com 2023-01-02 18:29 出处:网络
I\'m trying to count the number of times that text is changed in a given RichEdit control. I considered using even开发者_Python百科ts like key down, but that gets messy when you consider keys that don

I'm trying to count the number of times that text is changed in a given RichEdit control. I considered using even开发者_Python百科ts like key down, but that gets messy when you consider keys that don't change the text (like arrows, page up, etc). And how do you make sure you get all of those keys?

It seems it would be simpler to register a callback for a onTextChanged event, if one exists. Is there any way to do something like that?


Well you need to listen to the EN_CHANGE message if your using C++. Note that you also have to call SetEventMask with ENM_CHANGE to receive these notifications unlike a normal edit control will sends these messages by default.

0

精彩评论

暂无评论...
验证码 换一张
取 消