🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.web
5 messages
5 total messages Started by Byanex Mon, 09 May 2005 11:55
How to Refresh only one frame on TCppWebBrowser???
#1108
Author: Byanex
Date: Mon, 09 May 2005 11:55
8 lines
1122 bytes
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
Re: How to Refresh only one frame on TCppWebBrowser???
#1111
Author: Remy Lebeau (TeamB)
Date: Mon, 09 May 2005 16:48
22 lines
1756 bytes
"Byanex" <chikui@bol.com.br> wrote in message
news:427f4faf$1@newsgroups.borland.com...

> 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
Re: How to Refresh only one frame on TCppWebBrowser???
#1130
Author: Byanex
Date: Wed, 18 May 2005 17:36
24 lines
1510 bytes
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
Re: How to Refresh only one frame on TCppWebBrowser???
#1131
Author: Remy Lebeau (TeamB)
Date: Wed, 18 May 2005 20:16
19 lines
1644 bytes
"Byanex" <chikui@bol.com.br> wrote in message
news:428b7d1c$1@newsgroups.borland.com...

> From TCppWebBrowser i get the IHTMLDocument2

Please go re-read my earlier message.  I did not say anything about using
IHTMLDocument2 at all.

> 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
Re: How to Refresh only one frame on TCppWebBrowser???
#1132
Author: Byanex
Date: Thu, 19 May 2005 11:32
20 lines
1538 bytes
Gamit

>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.

>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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads