CHtmlView item or page properties...

When I right-click on the CHtmlView, I get a property dialog giving me information such as size.  If I do the same on an image, I get the size and dimensions and such.

If instead of opening up a HTML file, I open an image, is there some way in code, I can get the properties.  I don't want to bring up the property box, I'd like to be able to get a structure worth of information.  Size and dimensions are the most important at the moment...

Thanx in advance for your help..
jubjubAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
chensuConnect With a Mentor Commented:
Call CHtmlView::GetHtmlDocument (equivalent to IWebBrowser2::get_Document) to retrieve the IDispatch interface of the document. With this interface, call QueryInterface to retrieve the interface you want. Check out

Driller sample
http://msdn.microsoft.com/downloads/samples/Internet/browser/driller/Default.asp

You don't have to reject an answer to add a comment.
0
 
chensuCommented:
Look into the Dynamic HTML (DHTML) Object Model. Retrieve the IHTMLImgElement interface and call its methods, get_fileSize, get_height and get_width.

http://msdn.microsoft.com/workshop/c-frame.htm?944182326225#/workshop/browser/mshtml/mshtml.asp
0
 
jubjubAuthor Commented:
Thanx, Chensu, but I only have one small questions.  I've created the CHtmlView as an object inside a Dialog App.  My experience with Interfaces is minimal, but the problem I have, is how do I actually get an interface to this object?

I assume its probably a 1 or 2 line piece of code, but if you can tell me this, it'll greatly increase my knowledge and understanding that I'm lacking at the moment.

Thanx
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
jubjubAuthor Commented:
oh..sorry about the rejection..don't take it personally
0
 
chensuCommented:
No problem.
0
All Courses

From novice to tech pro — start learning today.