Discussion:
Is there a standard way to get access to the redirection surfaces?
(too old to reply)
Free Yu
2021-04-16 02:02:55 UTC
Permalink
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
2021-04-17 09:54:17 UTC
Permalink
Post by Free Yu
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
2021-04-20 09:53:25 UTC
Permalink
在 2021年4月17日星期六 UTC+8 下午5:54:20,<Christian ASTOR> 写道:
Post by Christian Astor
Post by Free Yu
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)
https://blogs.windows.com/windowsdeveloper/2019/09/16/new-ways-to-do-screen-capture/
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
2021-04-21 18:02:26 UTC
Permalink
Post by Free Yu
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
2022-10-29 08:20:21 UTC
Permalink
Post by Christian Astor
and you can extract a HBITMAP with D3DX)
Can You please give example how to get surface from DwmRegisterThumbnail?
Continue reading on narkive:
Loading...