The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Problem with IHTMLFramesCollection

Hi, So, if you use FireFox, then if you right click on a webpage and then select View Page Info, you will get a dlg box with tabs.  If you click on the links tab, you can see all the links the page contains at a glance.. so cool!

Now, I want to implement something like that in a small project(free project) I am working on and I am using C++ and using the IE Browser Object, hence IWebBrowser2, IHTMLDocument2, etc. etc.  The problem is, I can easily create a list of all the anchors or any elements I want in a  "regular" webpage.  However, when a webpage has some javascript that creates a webpage in a frame on the fly, then, I cannot access the contents of that frame.  I can get the no. of frames using IHTMLFramesCollection etc., but I cannot get the IHTMLDocument2 using get_document on these sort of pages.  I can however on other vanilla frames, just not on these type of pages.  Please help, thanks.
Monday, March 06, 2006
IE doesn't correctly wire up dynamic frames.  You might have some luck navigating the DOM for it and finding other ways to accessing it.  I suggest you take a look at
Almost H. Anonymous Send private email
Monday, March 06, 2006
Thanks, I'll look into it right away.
Monday, March 06, 2006
Here's the code I use. I run it when IWebBrowser2 notifies me that the main document is complete:;en-us;196340

Basically, it uses the EnumObjects method of the IOleContainer interface of the main document to get the IWebBrowser2 interface of each frame. From there you should be able to get the frame's document...
Wayne B Send private email
Tuesday, March 07, 2006
Thanks Wayne, I'll give it a spin this evening when I reach home.
Thursday, March 09, 2006

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz