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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML Frames and CHtmlView

Status
Not open for further replies.

sdc

Programmer
Nov 28, 2000
4
0
0
US
I am creating an MFC application using CHtmlView. I have implemented the IDocHostUIHandler Interface and am overriding the SetContextMenu method to display a custom menu. I am trying to access the URL of individual frames that the user right clicks similar to the default behavior of right clicking in the frame and selecting the properties to see the URL of that particular frame. Can anyone help me figure out how to access the URL of the frames? Do I need to use the IHTMLWindow2 interface?


Thanks,
Scott






--------------------------------------------------------------------------------
Please take a moment to read the Discussion Group rules. By posting, you agree to abide by these rules.
DNEWSWEB 4.6n Copyright © NetWin Ltd


 
Yes Scott, check out IHTMLWindow2.get_frames() method. That should get you going.

Good luck
-pete
 
Ok, I've been playing with the IHTMLFramesCollection2 interface that is returned from get_frames(). Things work fine, but I can not figure out how to get the name of the frame that was clicked on to pass to the item method. Any ideas?

Thanks,
Scott
 
It's been a long while since I did this but I think this is the path I used to do that.

IHTMLEventObj::get_srcElement
IHTMLElement::get_document
IHTMLDocument2::get_parentWindow

Hope this helps
-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top