Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

parsing HTML using IE's MSHTML some problem

Status
Not open for further replies.

DINESH37a

Programmer
Dec 18, 2003
3
0
0
IN
I am using IE MSHTML component to parse HTML of any page and basically trying to reach particular Node in the HTML tags. It s working fine in a console application But the smae code if I put it in MFC based dialog app its behaving strangely.
Its failing at QueryInteface for IHTMLImage interface that is used to extract <IMG> tags.

As I told , this problem is not occuring in a console application. Could someone tell me what could be the problem?

Thanks in advance
Dinesh
 
1. do you have problem only with IHTMLImage?
2. is your console application an MFC application?

Ion Filipski
1c.bmp
 
I think I will modify my question
I found the actual problem now. what do I is to get the the collection of all HTML elements and then parse through each tag to get to IMG tag. The collection of total elemnts under Console App(Win32 not MFC) shows correct number (say 278) but when I copy and paste the same code to dialog box under the Button click proc it shows the collections as only 5 HTML elements.
So obvioulsy when I query for IHTMLImg interface its failing beacuse that element is not there in the collection at all. But I dont why this strange behavior when it comes to GUI applicaition.
I am handling all the events w.r.t IHTML and other interfaces.
Are there any threading issues?
Why all the elements in the page are not getting loaded in MFC GUI app ?

Thanks
 
I think it is because with your MFC application you are using another version of DHTML.

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top