CHtmlView, the page source, and frames.

I have a CHtmlView application.  I would like to get the html source for a particular frame.

Ideally, it would work something like this:

CString html_source;
html_source = m_HtmlView->GetHtmlSource ();

Is this possible?   What are the steps necessary to get the html source for the frame?  Thanks.

Note that downloading it separately (with wininet for example) is not an option in this case.  The page in question requires the user to be "logged on".  When using WinInet, the server doesn't recongnize that I'm logged in and so gives me an error.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

helpmealotAuthor Commented:
Edited text of question.
One the page is laoded, query the document for IPeristStreamInit. Create a stream on some memory, and use the Write method in IPersistStreamInit to retrieve the source code.

See the revised HOLDER sample at for a working example of this method.

All my samples will soon move to someplace on .

..B ekiM

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Oh--and if you've got documents that have more than 1 frame, you'll need to get the document, query it for each individual frame, and then do the IPersistStorageInit trick against each frame.  IE considers each frame a separate entity.

..B ekiM
helpmealotAuthor Commented:
Excellent!  Your sample does exactly what I need.  Thanks!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.