Winapi EDITTEXT can't paste

空扰寡人 提交于 2020-01-05 11:36:33

问题


In a cpp project, I have an EDITTEXT in a resource file and I would like to allow user paste some text in it. I can paste using right click but not with the 'ctrl+v' shortcut.

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).

I have to make a callback or use an other controller ?

Thanks


回答1:


Most likely, the message for ctrl-v is catched by a parent window.

Check your accelerator table in resource view, or ACCELERATORS in the resource file to see if one is in there. Removing it should solve the problem.



来源:https://stackoverflow.com/questions/34655741/winapi-edittext-cant-paste

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!