🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #17512

Sending keys to App in XP

#17512
From: 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
Technical Details
Message-ID: <3e6fbcb4$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,b342d6df8873847,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-03-12 20:40:22 PST
From: "Timothy H. Buchman" <tbuchmanPLEASE(at sign)REMOVEcitycenter.org>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Sending keys to App in XP
Date: Wed, 12 Mar 2003 17:58:40 -0500
Lines: 33
MIME-Version: 1.0
Content-Type: text/plain;
 charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
NNTP-Posting-Host: 64.69.124.66
Message-ID: <3e6fbcb4$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1047510196 64.69.124.66 (12 Mar 2003 15:03:16 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail