 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Byanex Guest
|
Posted: Mon May 09, 2005 11:55 am Post subject: How to Refresh only one frame on TCppWebBrowser??? |
|
|
Hi,
I'm using TCppWebBrowser and when i load one page with frames, i would to REFRESH just one frame, not all page.
I'll be glad for some code!
Best regards
Byanex
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Mon May 09, 2005 4:48 pm Post subject: Re: How to Refresh only one frame on TCppWebBrowser??? |
|
|
"Byanex" <chikui (AT) bol (DOT) com.br> wrote
| Quote: | I'm using TCppWebBrowser and when i load one page with
frames, i would to REFRESH just one frame, not all page.
|
You need to access the browser's DOM interfaces in order to do that.
TCppWebBrowser has a ControlInterface property that is an IWebBrowser2
interface. From there, you can obtain the top-level IHTMLWindow2 interface,
and from there you then can obtain the individual IHTMLWindow2 interfaces
for each frame, and from there you can then navigate whichever window you
want.
Look at the following URL for more details:
Interfaces and Scripting Objects
http://msdn.microsoft.com/workshop/browser/mshtml/reference/ifaces/interface.asp
Gambit
|
|
| Back to top |
|
 |
Byanex Guest
|
Posted: Wed May 18, 2005 5:36 pm Post subject: Re: How to Refresh only one frame on TCppWebBrowser??? |
|
|
Hi,
After a time searching the way, i come back to ask for help
again.
From TCppWebBrowser i get the IHTMLDocument2 then from that
i get the IHTMLFramesCollection2 and then i get IHTMLWindow2
to each frame and then i can get the IHTMLDocument2 to each
frame.
From this point i want to reload only one frame, using:
pWindow is an IHTMLWindow2 previously assigned!
IHTMLDocument2 *pDoc = NULL;
pWindow->get_document(&pDoc);
pDoc->execCommand("Refresh",NULL,NULL,NULL);
But this code does't work, some one could show me the correct
syntax:
Thanks in advance
Byanex
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Wed May 18, 2005 8:16 pm Post subject: Re: How to Refresh only one frame on TCppWebBrowser??? |
|
|
"Byanex" <chikui (AT) bol (DOT) com.br> wrote
| Quote: | From TCppWebBrowser i get the IHTMLDocument2
|
Please go re-read my earlier message. I did not say anything about using
IHTMLDocument2 at all.
| Quote: | From this point i want to reload only one frame, using:
|
Please re-read the DOM documentation again. You should not be using
IHTMLWindow2::execCommand() for that (which you are not using correctly
anyway). Use IHTMLWindow2 instead. It has a location property that returns
an IHTMLLocation interface, which in turn has a reload() method that is
specifically for refreshing the current page.
Gambit
|
|
| Back to top |
|
 |
Byanex Guest
|
Posted: Thu May 19, 2005 11:32 am Post subject: Re: How to Refresh only one frame on TCppWebBrowser??? |
|
|
Gamit
| Quote: | Please go re-read my earlier message. I did not say anything
about using IHTMLDocument2 at all.
|
Sorry, realy you did not said any thing about IHTMLDocument2.
| Quote: | Please re-read the DOM documentation again. You should not
be using IHTMLWindow2::execCommand() for that (which you are
not using correctly anyway). Use IHTMLWindow2 instead. It
has a location property that returns an IHTMLLocation
interface, which in turn has a reload() method that is
specifically for refreshing the current page.
|
You right, using IHTMLLocation its works perfectly.
Thank you very much.
Best regards
Byanex
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|