WebBrowser's window does not contain anything interesting. You want the
document window which is an (indirect) child of WebBrowser's window. Get
the document pointer with IWebBrowser2::get_Document (probably also
available as CWebBrowser2::GetDocument or something like that), query
for IOleWindow, call GetWindow to obtain the HWND. Once you have that,
call GetDC API to get HDC corresponding to this HWND. Don't forget to
call ReleaseDC when you are done with it.
Alternatively, you can use IHTMLElementRender interface. Every element,
including document and <img>, is supposed to implement it. Disclaimer: I
haven't tried it myself.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925