MFC RichEdit如何实现光标在行末时可以通过鼠标选择文本?

[复制链接]
查看11 | 回复5 | 2021-1-27 05:14:19 | 显示全部楼层 |阅读模式
用MFCRichEdit做一个类似secureCRT的工具,如何实现插入符光标一直在行末闪烁同时可以通过鼠标选择文本?现在通过鼠标点击选择文本的时候命令行的光标就不见了。
象secureCRT的窗口中就可以让光标一直在命令输入处闪烁,同时可以操作鼠标选择前面已经输出的文本内容。
分 -->
回复

使用道具 举报

千问 | 2021-1-27 05:14:19 | 显示全部楼层
intShowCursor(TRUE);不起作用?
回复

使用道具 举报

千问 | 2021-1-27 05:14:19 | 显示全部楼层
intShowCursor(TRUE);不起作用?
回复

使用道具 举报

千问 | 2021-1-27 05:14:19 | 显示全部楼层
通过鼠标右键弹出的,右键菜单也可以。。

回复

使用道具 举报

千问 | 2021-1-27 05:14:19 | 显示全部楼层
ShowCursor()这个不是控制鼠标光标的吗?我说的光标是文本插入符光标。
回复

使用道具 举报

千问 | 2021-1-27 05:14:19 | 显示全部楼层
CWnd::ShowCaret
voidShowCaret();
Remarks
Showsthecaretonthescreenatthecaret’scurrentposition.Onceshown,thecaretbeginsflashingautomatically.
TheShowCaretmemberfunctionshowsthecaretonlyifithasacurrentshapeandhasnotbeenhiddentwoormoretimesconsecutively.Ifthecaretisnotownedbythiswindow,thecaretisnotshown.
Hidingthecaretiscumulative.IftheHideCaretmemberfunctionhasbeencalledfivetimesconsecutively,ShowCaretmustbecalledfivetimestoshowthecaret.
Thecaretisasharedresource.Thewindowshouldshowthecaretonlywhenithastheinputfocusorisactive.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行