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

Is there a standard way to get access to the redirection surfaces?

89 views
Skip to first unread message

Free Yu

unread,
Apr 15, 2021, 10:02:57 PM4/15/21
to
Hi,

I'm writing an application to stream the content of specified windows. The BitBlt works well for many applications, and even for DirectX applications.
However, when trying to get the content of Microsoft Word or PowerPoint, the magic fails and returns a black rectangle of pixels.

I wonder whether there's a standard way to get the bits of the window content for any windows.

Thanks,
--
freyu

Christian Astor

unread,
Apr 17, 2021, 5:54:20 AM4/17/21
to
Free Yu a écrit :

> I'm writing an application to stream the content of specified windows. The BitBlt works well for many applications, and even for DirectX applications.
> However, when trying to get the content of Microsoft Word or PowerPoint, the magic fails and returns a black rectangle of pixels.
>
> I wonder whether there's a standard way to get the bits of the window content for any windows.

A way is with DwmRegisterThumbnail
(used by Explorer Thumbnails in the Taskbar)
(then D3DXSaveSurfaceToFileInMemory to get the HBITMAP)
or also recent methods :
https://blogs.windows.com/windowsdeveloper/2019/09/16/new-ways-to-do-screen-capture/

Free Yu

unread,
Apr 20, 2021, 5:53:27 AM4/20/21
to
Thanks a lot. I'll give it a try. But I doubt that the content retrieved from
Thumbnail interface might be a low level mipmap.

Christian Astor

unread,
Apr 21, 2021, 2:02:31 PM4/21/21
to
Free Yu a écrit :

> Thanks a lot. I'll give it a try. But I doubt that the content retrieved from
> Thumbnail interface might be a low level mipmap.


What do you mean by "low level bitmap" ?
It is an exact live copy of the window (if it is a video, it is animated
and you can extract a HBITMAP with D3DX)

Jevgenijs Malcevs

unread,
Oct 29, 2022, 4:20:23 AM10/29/22
to
среда, 21 апреля 2021 г. в 21:02:31 UTC+3, Christian ASTOR:
> and you can extract a HBITMAP with D3DX)
Can You please give example how to get surface from DwmRegisterThumbnail?
0 new messages