Hello!
If there is formated text into the clipboard but I want to paste only plain text i have to use EM_PASTESPECIAL and set CF_TEXT as the format.
Ok..all right so far, but i want to paste plain text also when pressing "CTRL + V" into a richedit. I've subclassed it already but now I don't know how to let the programm know that the user presses Ctrl+V .
I've used WM_CHAR but it does not work.
Any ideas?
Thx!
If there is formated text into the clipboard but I want to paste only plain text i have to use EM_PASTESPECIAL and set CF_TEXT as the format.
Ok..all right so far, but i want to paste plain text also when pressing "CTRL + V" into a richedit. I've subclassed it already but now I don't know how to let the programm know that the user presses Ctrl+V .
I've used WM_CHAR but it does not work.
Any ideas?
Thx!
subclass
then
this will at least let you know when one or the other is pressed while your richedit has focus. the problem i have is how to recognize that both are pressed at the same time. i tried something like this:
.if wParam == VK_CONTROL && VK_V
;do whatever
.endif
and this didnt work. so maybe this might get you going in the right dirrection.. *shrug*
then
.if uMsg == WM_KEYDOWN
.if wParam == VK_CONTROL
;do whatever
.elseif wParam == VK_V
;do whatever
.endif
this will at least let you know when one or the other is pressed while your richedit has focus. the problem i have is how to recognize that both are pressed at the same time. i tried something like this:
.if wParam == VK_CONTROL && VK_V
;do whatever
.endif
and this didnt work. so maybe this might get you going in the right dirrection.. *shrug*
GetAsyncKeyState - can handle 2 key down messages, the worst of all you have to recode your main loop, but that isn't a problem. :)
Yep,
You must process what you are after in the main loop. Trap the WM_KEYUP/DOWN messages and bypass the original and substitute your own Ctl+V handling with the WM_PASTESPECIAL style.
Regards,
hutch@movsd.com
You must process what you are after in the main loop. Trap the WM_KEYUP/DOWN messages and bypass the original and substitute your own Ctl+V handling with the WM_PASTESPECIAL style.
Regards,
hutch@movsd.com
Depending on what else is happening in your program it may be worth considering defining Ctrl-V as an ACCELERATOR
eGo
eGo
What about subclassing WM_PASTE?