This is not
a difficult task.
You need to manipulate the MSHTML DOM.
Specifically, you need to assign an ID attribute to the HTML
fields you're interested in, and then from the C++ app, retrieve those elements
using IHTMLDocument3::getElementById( ), and QueryInterface the returned pointer
for the appropriate HTML Input element interface (say, IHTMLInputTextElement for
text fields) and then call a method like IHTMLInputTextElement::put_value( ) to
fill in the text field with the desired value.
You don't worry about this. MSHTML and the WebBrowser
control handle this one.
You have two options. You can handle the onclick event
of the button (I don't recommend this.) You can also expose a COM
object from your C++ code and let the WebBrowser control connect to it.
See my "Extending the WebBrowser Control DOM" article for detailed
information. This makes your HTML code as simple
as:
<button >My Text</button>
This is done using the same procedure I showed above, only using
get_value( ) instead of put_value( ).
--------- List Owner: [EMAIL PROTECTED] [Email: [EMAIL PROTECTED]]
|
Title: Message
- [MSVC] HTML Page Max
- RE: [MSVC] HTML Page Ehsan Akhgari
- Re: [MSVC] HTML Page Max
- Re: [MSVC] HTML Page qocarlos
- Re: [MSVC] HTML Page Max
- RE: [MSVC] HTML Page Ehsan Akhgari
- RE: [MSVC] HTML Page Ehsan Akhgari
- Re: [MSVC] HTML Page Juan Carlos Cobas
- Re: [MSVC] HTML Page Max
