follow up to: comp.os.ms-windows.programmer.misc
How can I send keystrokes to a Console (DOS) application under Win95?
keybd_event() doesn't work in Win 95 for Dos-Boxes, although it works under
I tried the following:
// bring console window to foreground
// Get app process and thread id
intMyThreadID = GetWindowThreadProcessId(Application->Handle,
// Get console process and thread id
intToThreadID = GetWindowThreadProcessId(hGblForeGroundWindow,
// Attach console window thread to app
AttachThreadInput(intToThreadID, intMyThreadID, TRUE))
SendMessage(hGblForeGroundWindow, WM_CHAR, Key, lParam)
instead of calling SendMessage() I tried it with keybd_event() called two
times, first for keydown, than for keyup.
It only worked under NT4.0, not under Win95 :-(
SendInput() may work under 98, but I need a solution for 95. The good old
recorder.exe, digged out from Win 3.11 is able to send a recorded macro
containing keystrokes to a Dos-Box, therefore I suppose, this must be able
using just the 16-Bit API.
Any suggestions will be appreciated