Title: Re: [MSVC] HTML Page

Hi!,

I’m trying to do something similar but I’m afraid I don’t have a solution yet.
Ehsan suggested me last week (see below) to have a look at the WALKALL sample
though I didn’t have the time to study it on detail. In addition, I think that
CInternetConnection and CHttpConnection can be of some help here.

If I find more information, I will let you know :-)

Follows my original post and Ehsan’s suggestion:

> How can I emulate from my application (VC 6.0/MFC) the actions
> performed by a user in a web page and then retrieve the results? For
> example, I'm interested
> in the following web page
> http://www.orgchm.bas.bg/~niki/fafoma/run/ > where a
> user can
> provide a text file and its format and then a CGI program (written in
> C) performs some calculations and returns the result as a
> picture and as a list
> in a edit field. I would like to automate this process from
> my app and read the
> contents of the edit field.

<EHSAN>
See the WALKALL sample from the Platform SDK to see how you can create a
UI-less HTML parser.  Once you figure it out, then the rest is simple.
You should load the desired HTML document in the MSHTML parser, populate
the <input> fields on the page, and invoke the <form> object's submit( )
method.

Note that it's not possible to simulate all the actions of a user on a
web page; only certain featurs are supported.  Fortunately, your desired
goal is among them.


>HI
>
> Sure, I guess it is a bit vague if you don't know what I'm trying to do.
>  The problem - for me anyhow - is that I'm not a "Web Programmer" and I
> haven't had to deal with HTML, Internet Explorer or scripting of any
> sort ( I have been lucky so far ;-) but that leaves me with a case of (
> toxic option syndrome ) I sure there are thousands of ways to do this
> but I don't know which one to look at. 
>
> Now I need to create an application that can display a pre made Web -
> Page that will have some "Spaces" such as Edit Boxes, Selection Boxes (
> drop down ) and buttons on it.  I need to be able to dynamically place
> text in to the edit boxes then display the web page from memory.  Then
> when someone select on of the buttons be able to pick up the text from
> the Edit Boxes and the selected item from the Selection Boxes.
>
>
> In short I need to:
>
> >From my C++ app, place info in to a web page
> Display it.
> Wait for a possible Button click (on the web page) although the app my
> need to do something else - display different pages.
> The C++ app should respond to the Button
> Get the results from the Web page
> Do something interesting.
>
> I'll have a look at your article and see where I go from there.
>
> Regards
> Max
>
>
>   ----- Original Message -----
>   From: Ehsan Akhgari
>   To: [EMAIL PROTECTED] read.zl6
>   Sent: Wednesday, September 17, 2003 8:24 PM
>   Subject: RE: [MSVC] HTML Page
>
>
>
>     Whats the easiest way to pass values to a HTML page, then display it
> and retrieve value from a HTML page depending on a button click (from
> the HTML page).
>
>     The HTML page will be displayed in a MSVC desktop program using the
> HTML classes.
>   See my "WebBrowser Control Goodies" article.  Your question is so
> generic that I'm not sure what you're trying to do, but I bet you will
> find something useful there.  Or maybe you don't mind explaining your
> exact problem a bit more?
>   ---------
>   Ehsan Akhgari
>
>   List Owner: [EMAIL PROTECTED]
>
>   [Email: [EMAIL PROTECTED]
>   [WWW: http://www.beginthread.com/Ehsan ]
>
>         Mature manhood: that means to have rediscovered the seriousness
> one had as a child at play.
>         -Beyond Good And Evil, F. W. Nietzsche
>
>
>

Reply via email to