🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #1877

Re: Duplicating keyboard messages...?

#1877
From: Raptor
Date: Thu, 28 Mar 1991 17:34
36 lines
2217 bytes
risto@tuura.UUCP (Risto Lankinen) writes:
>lwallace@javelin.es.com (Raptor) writes:
>>I've sent WM_KEYUPs and WM_KEYDOWNs to other applications, and used Spy to
>>examine them.

>Since you cannot be sure whether the target reacts upon WM_KEYUP/DOWN or
>the resulting WM_CHAR/SYSCHAR/MENUCHAR message, you should not send these
>messages with SendMessage(), because they bypass the target application's
>TranslateMessage() call in its message loop.  You should use PostMessage()
>instead, which allows the target app. to translate the WM_KEYUP/DOWN's as
>appropriate.

Hey, thanks for answering!  I'm getting desperate about this problem;
it's one of two that are keeping me from getting my application done.

Alas, I misinformed you.  I do indeed use PostMessage(), with the same
lack of results.

Lately, I've tried both SetFocus() (before sending the messages) and
WaitMessage() (between the KEYDOWN and KEYUP messages) to see if I was
hogging any resources and preventing the other application from
processing my messages.  No improvement.

Why in the heck does SDKHelp work and all these others don't??????  A
possible hint is, the keystroke I'm sending SDKHelp is F1, while all
the other attempts have been control-characters (requiring two
messages...).  I've used Spy again and tried to get my messages to
appear *exactly* as the actual keystrokes, but there's only so much
I've been able to accomplish to that end.

Again, thanks for the input.
-- 
Lynn Wallace			   |I am not an official representative of
Evans and Sutherland Computer Corp.| <- E&S.  Or for that matter, unofficial.
Salt Lake City, UT 84108	   |Internet: lwallace@javelin.sim.es.com
			War not make one great! -- Yoda
Technical Details
Message-ID: <1991Mar28.173442.2437@javelin.es.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!uunet!orca!javelin.es.com!lwallace
References: <1991Mar19.164227.19245@javelin.es.com> <1108@tuura.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!uunet!orca!javelin.es.com!lwallace
From: lwallace@javelin.es.com (Raptor)
Newsgroups: comp.windows.ms.programmer
Subject: Re: Duplicating keyboard messages...?
Message-ID: <1991Mar28.173442.2437@javelin.es.com>
Date: 28 Mar 91 17:34:42 GMT
References: <1991Mar19.164227.19245@javelin.es.com> <1108@tuura.UUCP>
Organization: Evans & Sutherland Computer Corp., Salt Lake City, Utah
Lines: 36