how do i find all "src" attributes from frame object of html document?
-
i have MSHTML::IHTMLDocument2Ptr pointer loaded with html document.there i can see all style sheets,images,iframe object. iframe object again will contain "src" attributes with source location. i want all iframe or frame objects "src" attributes from html document.... please help me
-
i have MSHTML::IHTMLDocument2Ptr pointer loaded with html document.there i can see all style sheets,images,iframe object. iframe object again will contain "src" attributes with source location. i want all iframe or frame objects "src" attributes from html document.... please help me
yogish293 wrote:
have MSHTML::IHTMLDocument2Ptr pointer loaded with html document.there i can see all style sheets,images,iframe object. iframe object again will contain "src" attributes with source location. i want all iframe or frame objects "src" attributes from html document....
please help meYou make Absolutely No Sense in a CPP Forum(I know you are desperate.) In this forum, HTML is as common as ancient greek. :)
Bram van Kampen
-
yogish293 wrote:
have MSHTML::IHTMLDocument2Ptr pointer loaded with html document.there i can see all style sheets,images,iframe object. iframe object again will contain "src" attributes with source location. i want all iframe or frame objects "src" attributes from html document....
please help meYou make Absolutely No Sense in a CPP Forum(I know you are desperate.) In this forum, HTML is as common as ancient greek. :)
Bram van Kampen
I did my first website in pure HTML from a text editor... :-O ...and btw, MSHTML is an HTML library, not straight up HTML...
-
I did my first website in pure HTML from a text editor... :-O ...and btw, MSHTML is an HTML library, not straight up HTML...
Albert Holguin wrote:
I did my first website in pure HTML from a text editor... :O
There are other ways?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
-
I did my first website in pure HTML from a text editor... :-O ...and btw, MSHTML is an HTML library, not straight up HTML...
Shh, such talk leads to Vi vs. Emacs flamewars... :)
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > //TODO: Implement signature here<
-
i have MSHTML::IHTMLDocument2Ptr pointer loaded with html document.there i can see all style sheets,images,iframe object. iframe object again will contain "src" attributes with source location. i want all iframe or frame objects "src" attributes from html document.... please help me
IHTMLDocument2::get_frame
will give you anIHTMLFramesCollection2
interface. UseIHTMLFramesCollection2::item
to iterate through the collection. Each iteration will give you anIHTMLElement
interface corresponding to each frame. Then useIHTMLElement::getAttribute
to get the value of theSRC
attribute.«_Superman_» _I love work. It gives me something to do between weekends.
-
IHTMLDocument2::get_frame
will give you anIHTMLFramesCollection2
interface. UseIHTMLFramesCollection2::item
to iterate through the collection. Each iteration will give you anIHTMLElement
interface corresponding to each frame. Then useIHTMLElement::getAttribute
to get the value of theSRC
attribute.«_Superman_» _I love work. It gives me something to do between weekends.
-
_variant_t MSHTML::IHTMLFramesCollection2::item(VARIANT var); this is declaration of item function... there is no interface to get IHTMLElement...
The
VARIANT
will contain theIDispatch
pointer of the frame element. You can do aQueryInterface
for anIHTMLElement
on thisIDispatch
pointer.«_Superman_» _I love work. It gives me something to do between weekends.
-
The
VARIANT
will contain theIDispatch
pointer of the frame element. You can do aQueryInterface
for anIHTMLElement
on thisIDispatch
pointer.«_Superman_» _I love work. It gives me something to do between weekends.
for(long nfram = 0; nfram < pColFrames->length ; nfram ++) { _variant_t vIdx(i, VT_I4); _variant_t vDisp; vDisp = pColFrames->item(&vIdx); if(vDisp.vt == VT_DISPATCH) { vDisp.pdispVal->QueryInterface(IID_IHTMLElement,(void**)&pElem); ...................//rest of operation } } but always if(vDisp.vt == VT_DISPATCH) will fail...means vDisp.vt become empty.