Capture Paste to Textbox

Started by Nathan Durland, November 18, 2014, 01:25:24 PM

Previous topic - Next topic

Nathan Durland

I have a text box in my app, and by capturing the WM_CHAR message I can limit the data to the characters I want, can change some on the fly.  However, pasting data into the text box seems to bypass that.  How can I capture that event?  Looking around, it seems I need WM_APPCOMMAND in my _CUSTOM processor, but I'm struggling on how to snag it, and what to do once I do.

Any pointers appreciated.

Wilko Verweij


Eddy Van Esch

Capture WM_PASTE event, copy and (possibly) modify clipboard content before pasting?
Just a suggestion. Haven't tried this myself.
Eddy

Nathan Durland

Quote from: Eddy Van Esch on November 18, 2014, 07:16:35 PM
Capture WM_PASTE event, copy and (possibly) modify clipboard content before pasting?
Just a suggestion. Haven't tried this myself.

That's a forehead slapper -- I never thought to search for such an event...

off to test.