Anyone know how to simulate holding down a CTRL key in C++. I'm using Windows XP.
Thanks

Recommended Answers

You could probably replicate this using win32 but then you would have to figure how to hook into the most active window, or tell the app where you intend to send the ctrl to.

Easier would be to use autoit.

Jump to Post

All 2 Replies

You could use an autoit script and call that from C++ using the system() or one of the exec() functions. AutoIt lookes very capable. Unfortunately they don't provide source code, but it is free.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.