tags:

views:

47

answers:

1

Background I'm trying to write an application in C++ that will run on Vista. The application will take input from a the user (via input text box), perform some manipulation of that text, and will direct the user to click on an input box in another application. I'd like my application to print text into the second application's text box.

Question What is the simplest way to print text into an input box without typing the text in by a keyboard?

+1  A: 

You are proposing to violate very basic Windows user interface conventions. I strongly recommend that you push the manipulated text onto the clipboard, and let the user use Paste to put it in the target text box.

If you insist on your original plan, you will have to use complex Win32 APIs to get a handle to the target window and then send it a WM_SETTEXT.

bmargulies
I went ahead with the clipboard solution and that worked fine for my purpose. Thanks.
Addie