0

Hello everyone,

Is there an equivalent to SendKeys.Send in C++? I have looked into keybd_event and SendInput, but to my knowledge you can only send one key at a time with those functions.

Thanks for any help.

Edit: I'm not using the .Net Framework so I can't use any of that stuff.

5
Contributors
4
Replies
6
Views
10 Years
Discussion Span
Last Post by rdwofrdw
0

>>Is there an equivalent to SendKeys.Send in C++?

No. C++ language knows nothing (other than what it inherited from C language in stdio.h) about the keyboard because its os specific. You have to use os-specific api function calls to send them one character at a time like jamthwee suggested.

0

If I had the source of the application being controlled, I would use ole/COM automation instead to avoid the possible hit or miss performance of SendKeys but what would you learn if you could not try? So, I don't know either
BUT I refer you to a codeproject article called 'Sendkeys in C++' because someone thinks it is possible and the article has a high rating.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.