🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.windows.misc
2 messages
2 total messages Started by jeff Sun, 17 Mar 1991 23:42
Activating a button with a key
#517
Author: jeff
Date: Sun, 17 Mar 1991 23:42
14 lines
947 bytes
I'm trying to figure out how to "stuff keystrokes" into Windows.
I've been able to successfully do this for edit controls, using
the obvious "send WM_CHAR" or "send WM_KEYDOWN, WM_KEYUP" sequences.
However, I'm stuck on how to activate a button by pressing a key.
I know this is possible, since the Recorder can do it with no
problem, but no matter where I send messages, nothing happens.
I've tried SPYing but that hasn't revealed any useful info.

Solutions or pointers would be appreciated.  Thanks...

	Jeff Dean
	jeff@cdp.igc.org
	uunet!pyramid!cdp!jeff
Re: Activating a button with a key
#518
Author: Paul Bonneau
Date: Wed, 20 Mar 1991 18:30
19 lines
1258 bytes
In article <1097300009@cdp> jeff@cdp.UUCP writes:
>
>I'm trying to figure out how to "stuff keystrokes" into Windows.
>I've been able to successfully do this for edit controls, using
>the obvious "send WM_CHAR" or "send WM_KEYDOWN, WM_KEYUP" sequences.
>However, I'm stuck on how to activate a button by pressing a key.
>I know this is possible, since the Recorder can do it with no
>problem, but no matter where I send messages, nothing happens.
>I've tried SPYing but that hasn't revealed any useful info.
>
Try PostMessage() instead of send.  This way WM_KEYDOWN and
WM_KEYUP messages will get translated by the call to
TranslateMessage() inside the message loop of the recipient.

Message that are sent (SendMessage()) do not go to the
application's message queue, and so do not get processed
by TranslateMessage().

cheers - Paul Bonneau.
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