Posted: Mon Jan 04, 2010 1:57 pm Post subject: SendMessage() API questions
Hi guys, how can I send a text string to a Console window without it being in focus? SendMessage() would be great if I could actually use it with console windows. _________________
sendmessage will send window message to the specific window
since console isn't actually a window it won't work for u
but there's other way to get the console's handle and call WriteConsole
using the handle of the console
should do the job
GetStdHandle: http://msdn.microsoft.com/en-us/library/ms683231%28VS.85%29.aspx
return the handle to the standard IO device by your request
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum