Участник:StasFomin/Bookmarks/Stegano — различия между версиями

Материал из DISCOPAL
Перейти к: навигация, поиск
(Добавлена закладка Accessing bit data of DwmRegisterThumbnail - c++)
(Добавлена закладка delphi - Past DWM screen capture to TBitmap - Stack Overflow)
Строка 2: Строка 2:
 
=== 2020-07 ===
 
=== 2020-07 ===
  
 +
* 2020-07-03, 10:22:11: [https://stackoverflow.com/questions/35736080/past-dwm-screen-capture-to-tbitmap delphi - Past DWM screen capture to TBitmap - Stack Overflow]
 +
*: <html><span class="comment-copy">Using BitBlt() only works if the destination windows is fully opaque (alpha 255) and is visible to the user. What if I just want to get the raw image of an hidden window without displaying it ? Is it possible to create a fake HWND ? If not is it possible to intercept the paint event on the destination window just before it is painted ? Doesn it exist a Windows Message WM_ somenthing to achieve that ? Restore, capture and hide is not an option because it create "flickering" effect on the screen especially if you take more than one capture of the window. So what might be an alternative solution?</span>                  –&nbsp;<a href="https://stackoverflow.com/users/1423806/bemipefe" title="937 reputation" class="comment-user">Bemipefe</a>                <span class="comment-date" dir="ltr"><a class="comment-link" href="https://stackoverflow.com/questions/35736080/#comment97916397_35737261"><span title="2019-04-10 11:10:59Z, License: CC BY-SA 4.0" class="relativetime-clean">Apr 10 '19 at 11:10</span></a></span></html>
 +
<!-- NEXT BOOKMARK -->
 
* 2020-07-03, 10:21:15: [https://android.developreference.com/article/20737763/Accessing+bit+data+of+DwmRegisterThumbnail Accessing bit data of DwmRegisterThumbnail - c++]
 
* 2020-07-03, 10:21:15: [https://android.developreference.com/article/20737763/Accessing+bit+data+of+DwmRegisterThumbnail Accessing bit data of DwmRegisterThumbnail - c++]
 
*: <html>I have been playing around with the Windows DWM APIs to see if I can capture external windows with them. I have made a small C++ program which creates a window, grabs an external HWND, links the external HWND to my window, and successfully renders the external data. The API works great in this situation. What I'm trying to figure out now is whether or not I can capture the bit data which being rendered into my own window. I figured since I have ownership of this window there should be a way. My Goals To capture the DWM rendered content in my own window into a bitmap. This should work regardless of whether my window is in the foreground or background. My Test Case In my test case I have a youtube video playing in my external window. I put it in the background and allow the video to render into my application's window in the foreground. From there I try the methods below to capture the content of my window. Capture Methods Attempted BitBlt I've tried to use BitBlt to capture the windows content into a bitmap. Whenever I try this though, I simply end up with title bar of my window and none of the DWM thumbnail content. However, if instead of getting a DC for my window, I get a DC for the entire screen and grab the coordinates of my window, I am able to get the DWM rendered content. But if the window is in the background, obviously I don't get what I want. PrintWindow PrintWindow fails for me as well. I get similar results to BitBlt, my windows title bar but nothing in the content area. My Question Is there any reliable way to get the bit data from the DWM APIs? Could I do something on WM_PAINT/WM_PRINT to capture this?</html>
 
*: <html>I have been playing around with the Windows DWM APIs to see if I can capture external windows with them. I have made a small C++ program which creates a window, grabs an external HWND, links the external HWND to my window, and successfully renders the external data. The API works great in this situation. What I'm trying to figure out now is whether or not I can capture the bit data which being rendered into my own window. I figured since I have ownership of this window there should be a way. My Goals To capture the DWM rendered content in my own window into a bitmap. This should work regardless of whether my window is in the foreground or background. My Test Case In my test case I have a youtube video playing in my external window. I put it in the background and allow the video to render into my application's window in the foreground. From there I try the methods below to capture the content of my window. Capture Methods Attempted BitBlt I've tried to use BitBlt to capture the windows content into a bitmap. Whenever I try this though, I simply end up with title bar of my window and none of the DWM thumbnail content. However, if instead of getting a DC for my window, I get a DC for the entire screen and grab the coordinates of my window, I am able to get the DWM rendered content. But if the window is in the background, obviously I don't get what I want. PrintWindow PrintWindow fails for me as well. I get similar results to BitBlt, my windows title bar but nothing in the content area. My Question Is there any reliable way to get the bit data from the DWM APIs? Could I do something on WM_PAINT/WM_PRINT to capture this?</html>

Версия 07:22, 3 июля 2020

2020

2020-07

Навигация