Sending Keystrokes to Dialog Boxes/Windows

Sending Keystrokes to Dialog Boxes/Windows

Post by Ian_ » Wed, 26 Jul 2000 04:00:00



I'm learning Win32 API programming and was wondering if anyone
has a basic code example of sending keystrokes (ALT + Y, ALT +
O, <Enter>, <Tab> etc...) to a dialog box/window ? Or if they
could point me to a website that would contain such code ?

Thanks !

Ian D.

-----------------------------------------------------------

Got questions?  Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com

 
 
 

Sending Keystrokes to Dialog Boxes/Windows

Post by tuxx » Fri, 28 Jul 2000 04:00:00


check out WM_CHAR, WM_SYS* messages.

regards, tuxx

 
 
 

Sending Keystrokes to Dialog Boxes/Windows

Post by rz » Fri, 28 Jul 2000 04:00:00


I just went to www.codepile.com, did a search for keybd_event and found one
sample that may help you and me (I've been working on a similar problem). I
think you do not want to use keybd_event, because it sends to whatever
window has focus. But the code I just found should help us use WM_CHAR to
send "normal" (a, b, ...) and special characters (arrow, tab, ...) to a
specified window.

--
-----------------------------------------
To reply to me, remove the underscores (_) from my email address.

Robert E. Zaret
PenFact, Inc.
20 Park Plaza, Suite 454
Boston, MA 02116
www.penfact.com


>I'm learning Win32 API programming and was wondering if anyone
>has a basic code example of sending keystrokes (ALT + Y, ALT +
>O, <Enter>, <Tab> etc...) to a dialog box/window ? Or if they
>could point me to a website that would contain such code ?

>Thanks !

>Ian D.

>-----------------------------------------------------------

>Got questions?  Get answers over the phone at Keen.com.
>Up to 100 minutes free!
>http://www.keen.com

 
 
 

1. Sending keystrokes to a DOS box from a Dialog Box.

Hi,
I am trying to send a keystroke to a DOS command prompt from a Dialog Box
application in Win 95. I have found out that a DOS box receives a WM_USER +
26 when a key is pressed. (Did this using Spy++). Does anybody know what the
wParam and lParam are for this? I cannot seem to find this documented
anywhere.

Any help would be greatly appreciated.
Thanks,
-Sridhar.

2. Heart of darkness

3. Sending keystrokes to DOS boxes from a Dialog app.

4. Need Windows 95 Driver for HP4L LaserJet Printer

5. Trapping Keystrokes in a Dialog Box or Dialog based application

6. Help please. Corrupt mailbox problem

7. Simple way to send keystrokes to another box

8. Windows Hooks...

9. Send keystrokes to Dos box

10. Sending keystrokes to an empty list box

11. Sending keystrokes to a DOS program running in an MSDOS Box

12. Sending keystrokes to Win95 Dos-box

13. Sending keystrokes to DOS boxes??