Archived

This topic is now archived and is closed to further replies.

Bit of web programming

This topic is 5704 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Take a look at the Internet Explorer ActiveX control (Unless you''ve used something like Windows 98 Lite to wipe your system you''ll have it). It will not only let you stick a web browser in your app, but you can also use it to programmably access components on a webpage (links, text, buttons, fields)

Share this post


Link to post
Share on other sites
Or you could just look at the HTTP POST or GET command the button is producing, open up a socket to the web server, and do the POST or GET in your code. Of course, that all depends on what you are trying to acheive.

Share this post


Link to post
Share on other sites
Or I guess you could try and find the window handle and send the relevant message... but I've never tried that - so I could be wrong.

[EDIT :: That's assuming it's an actual Win32 button in the browser - otherwise you could probably still do it, but you'd need to send a different message]

What is it that you're trying to achieve?

John B

[edited by - JohnBSmall on May 6, 2002 1:53:31 PM]

Share this post


Link to post
Share on other sites
What I''m trying to do is enter so info into a couple of different drop down boxes. To do this I''m just going to create the text on the fly with VC++ save the text as an HTML fill and use ShellExecute to call the page. Now on this page is a push button that will check the data. If it is correct it will goto one page if it is wrong another page. What I''m wondering is how to have my program tell the browser to push the button and then check the URL address to see which page loaded up.

Share this post


Link to post
Share on other sites
Well the program is only for me, and I guess I really wouldn''t have to use the browser. Just as long as I could figure out which combo was the right one. I really don''t have any experience with trying something like this. And I''m starting to think it might be a little to much. But if you got some ideas/links I will have to get it a try at least.

Share this post


Link to post
Share on other sites
You need to create a socket and connect to the web server and send an HTTP GET or POST string. We''re talking about one page of code here. Then you need to wait for the server to send back its response with the recv() function.

Share this post


Link to post
Share on other sites
You can just use
- MSXML.ServerXMLHTTP component (extremely easy)
OR
- WinInet API

Couple of lines of code and your done (simple and straight forward) no browser no nothing take a look at the MSDN for those two options.

Hope that helps
IDispatch

Share this post


Link to post
Share on other sites