开发者

Find text autoscroll in MFC CRichEditView

开发者 https://www.devze.com 2022-12-19 15:08 出处:网络
I have an application with a CRichEditView, and I\'d like to find text in it. By creating a menu item \"Find\" with ID_EDIT_FIND, the view opens the find window and text is found by highlighting. BU

I have an application with a CRichEditView, and I'd like to find text in it.

By creating a menu item "Find" with ID_EDIT_FIND, the view opens the find window and text is found by highlighting. BUT... the view is not scrolled, so if a开发者_如何学编程 text is found 100 lines below visible, that's where it stays.

Ideas on how to make the control autoscroll so that found items are always visible?


Ok, answer:

ctrl.SetOptions(ECOOP_OR, ECO_AUTOVSCROLL);

That did the trick :)

0

精彩评论

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