I want to develop a small Visual C++ applicaiton that can do as follows: 1. Ask the end user to enter a string. 2. Send the string to a textbox in a webpage. 3. Simulate a button click event in the webpage. 4. Retrieve the result from the webpage and display the usable information to the end user. Take www.google.com as an example, my application should be able to accept a search query string from the end user, send the query string into the searchbox at www.google.com, simulate clicking the "Google Search" button, and retrieve the search result from www.google.com and display them as plain text in my application's window. I have no idea on how to do this. Can anyone suggest a tutorial or a sample? Thank you very much.
I will suggest you to use .NET C++/C# for this. In .NET framework there is good libraries to do web requests - exactly what you need to do this job. Google for tuturials about web requests/response and creating windows forms.
You can use WinInet API for this. Also, you can simply use HTTP POST to directly set the text and click on the button. I have added an example file on WinInet here.