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

11 views
Skip to first unread message

Free Yu

unread,
Apr 15, 2021, 10:02:57 PMApr 15
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 AMApr 17
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 AMApr 20
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 PMApr 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)

Reply all
Reply to author
Forward
0 new messages