Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can I tell OCX to draw itself into a DC I have created?

3 views
Skip to first unread message

chris.shea...@gmail.com

unread,
May 16, 2009, 9:45:00 AM5/16/09
to
My app is creating an MSIE browser OCX control inside one of its
windows, and now I would like to have more control over that OCX draws
itself. Specifically, I need to have the OCX be hidden (not appear on
the screen) but have my app be able to do a "screen capture" of what
it would be displaying, were it visible. Is there some nifty COM
interface that lets me do this, or some clever Windows trick? I've
tried getting the window DC and using the Print() function, neither
worked.

Thanks,
Chris

Igor Tandetnik

unread,
May 16, 2009, 9:56:48 AM5/16/09
to
<chris.shea...@gmail.com> wrote in message
news:71145ed0-7bef-43a1...@t11g2000vbc.googlegroups.com

> My app is creating an MSIE browser OCX control inside one of its
> windows, and now I would like to have more control over that OCX draws
> itself. Specifically, I need to have the OCX be hidden (not appear on
> the screen) but have my app be able to do a "screen capture" of what
> it would be displaying, were it visible.

Query the document object for IViewObject, call Draw
--
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


0 new messages