在编辑控件中摆脱插入符号 [英] getting rid of the caret in an edit control

查看:64
本文介绍了在编辑控件中摆脱插入符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所说,我只是想通过编辑或richedit控件使其完全没有闪烁的光标,因此,与ES_READONLY一起,它所做的只是充当打印输出,可以选择文字,就像您在网页上看到的文字一样.无法编辑,但可以选择.我在msdn中找到了HideCaret()函数,它返回成功,但插入符号仍然存在.在这里有任何帮助吗?

as the title says, i''m simply trying to make it to where there is no blinking cursor at all with an edit or richedit control so that, coupled with ES_READONLY, all it does is act as a printout that can select text, like the text you would see on a webpage. uneditable but selectable. I found the HideCaret() function in the msdn, and it returns successful, but the caret is still there. any assistance here?

推荐答案

仅需注意一点:如果要隐藏编辑控件中的插入符号,在我看来,您将滥用此控件.它旨在编辑文本,应使用脱字号进行编辑.如果需要静态的不可编辑文本,请使用静态文本或标签控件.

—SA
Just one note: If you want to hide a caret from a edit control, it looks to me you''re going to abuse this control. It is designed to edit texts, which should be done with caret. If you need static non-editable text, use static text or label controls.

—SA


这篇关于在编辑控件中摆脱插入符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆