🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
1 messages
1 total messages Started by Timothy H. Buchman Wed, 12 Mar 2003 22:58
Sending keys to App in XP
#17512
Author: Timothy H. Buchman
Date: Wed, 12 Mar 2003 22:58
32 lines
2598 bytes
I'm  trying to code-operate a piece of licensed freeware that's
written, I think, in VC++.  It has three windows, and when a live user
types with *any* of the three windows focused, the (real) keys go to
the right place.  I started with Gambit's WM_CHAR code
http://www.mers.com/MERLIST/BORLAND/PUBLIC/CPPBUILDER/WINAPI/42182.HTM
L
but in fact I've also tried his WM_KEYDOWN and keybdevent() code.  (I
ShellExecute() the app from my BCB6 app, so I can use
::SetForegroundWindow, which works for keybdevent().)

But I cannot get the app to receive the artificial keystrokes.  The
windows are, I suspect, heavily subclassed and custom painted.
WinSpy++ tells me that the main window is a dialog class, #32770, and
the other two windows must be the developer's class, HogNTSimulator.
(This is an off-line mock-up of a turnkey theatrical light board.)
I've sent each type of code-keystroke to all three windows, with no
effect.  Two of the windows have no child windows, and the main window
has only static graphics of command buttons, which can be clicked on
if you don't know the keyboard input codes.

I have been able to send keystrokes to Wordpad with some of this code.

Can anyone give me another approach to work on?  Is there an
application keyboard hook active?

Dell P4M laptop, WinXP Pro SP1, BCB6 Pro.
--
Timothy H. Buchman
========================================
City Center Theater, New York NY
mail address tbuchmanPLEASE(at sign)REMOVEcitycenter.org
Search .borland message archive on http://www.mers.com/searchsite.html
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads