Paste text into console
I’m trying to paste a string into win32 cmd console for which I have the window handle. My issue is I can’t send a sequence of keys with WM_KEYDOWN/CHAR/UP SendMessage()s and the console won’t respond to a WM_PASTE. I’ve got the data into a global buffer on the clipboard (shows up in the MS Word viewer), but I’m not sure how to paste it into the console.
I’d like to be able to do my usual SetWindowLong(GWL_WNDPROC) to figure out the messages sent to the console when I r-click and say ‘Paste’ from the pop-up menu, but a GetWindowLong(GWL_WNDPROC) returns 0 and any SetWindowHookEx()s never get any info. I assume the cmd console has some funky msgproc system, but I don’t know it. I unfortunately am using Vis Studio Express and don’t have access to Spy++ *cry*
If anyone does have Spy++ and can post the sequence of msgs sent to a command prompt when they do a pop-up menu Paste, I’d really appreciate. Or some less clunky solution.
Thanks in advance for your help.
sulu
Read the original:
Paste text into console
Related posts:
- Paste text into console Hi all: I'm trying to paste a string into...
- Cannot create a new console application. Only XNA shows up. ---.NET 3.5 SP1 C# Express 2008--- When I try...
- Prevent Paste or Trap Paste into Edit Box Found how to do it: In the key down...
- Paste text into richedit without formatting I'm using the RichEdit control in my program and...
- Output text into console window from GUI app Say, if my GUI Win32 app is started from...
Related posts brought to you by Yet Another Related Posts Plugin.
08