简体   繁体   English

Winapi EDITTEXT无法粘贴

[英]Winapi EDITTEXT can't paste

In a cpp project, I have an EDITTEXT in a resource file and I would like to allow user paste some text in it. 在cpp项目中,我在资源文件中有一个EDITTEXT,我希望允许用户在其中粘贴一些文本。 I can paste using right click but not with the 'ctrl+v' shortcut. 我可以使用右键单击粘贴,但不能使用“ ctrl + v”快捷键粘贴。

EDITTEXT        IDC_EDITTAN, 90, 46, 80, 12, ES_AUTOHSCROLL

It seems that no edit control styles or rich edit control styles allow this ( https://msdn.microsoft.com/en-us/library/windows/desktop/bb774367(v=vs.85).aspx ). 似乎没有任何编辑控件样式或丰富的编辑控件样式允许这样做( https://msdn.microsoft.com/zh-cn/library/windows/desktop/bb774367(v=vs.85).aspx )。

I have to make a callback or use an other controller ? 我必须进行回调或使用其他控制器?

Thanks 谢谢

Most likely, the message for ctrl-v is catched by a parent window. ctrl-v的消息最有可能被父窗口捕获。

Check your accelerator table in resource view, or ACCELERATORS in the resource file to see if one is in there. 在资源视图中检查您的加速器表,或在资源文件中检查ACCELERATORS ,以查看其中是否有ACCELERATORS Removing it should solve the problem. 删除它应该可以解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM