simuate the keyboard

Posted on 1999-07-26
Medium Priority
Last Modified: 2013-11-20
   In order to test my system, I want to write a pragram to simuate the keyboard, so I can open and close different files one by one. But I do not know how to do it by MFC. I want the help imminently.
Question by:lhq

Expert Comment

ID: 1311544
>> I want to write a pragram to simuate the keyboard, so I can open and close different files one by one
I cant get clear ...
what has the keyboard to do with opening and closing files ..?  
LVL 23

Accepted Solution

chensu earned 210 total points
ID: 1311545
1. You can simulate a keystroke by using the keybd_event function.

2. There is an article "Sending Keystrokes under Win32" in Windows Developer's Journal March 1997 issue. In this article, the author demonstrates how to use a journal playback hook in Windows NT and Windows 95 to send keystrokes to other applications. Download the source code at ftp://ftp.mfi.com/pub/windev/1997/mar97.zip.


Author Comment

ID: 1311546
Thanks alot!

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question