Winapi EDITTEXT can't paste

2019-08-10 23:42发布

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条回答
Bombasti
2楼-- · 2019-08-11 00:04

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.

查看更多
登录 后发表回答