-
January 20th, 2022, 12:30 AM
#1
How to capture the screen of a window that contains transparency?
Trying to find a way to capture a window that contains transparency that also works when the window is covered by another.
I tried the function [PrintWindow] but it doesn't store the transparency information in the hdc.
If possible using gdi+.
https://docs.microsoft.com/en-us/win...er-printwindow
-
January 20th, 2022, 04:35 AM
#2
Re: How to capture the screen of a window that contains transparency?
Victor Nijegorodov
-
January 20th, 2022, 06:55 AM
#3
Re: How to capture the screen of a window that contains transparency?
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
January 20th, 2022, 09:43 AM
#4
Re: How to capture the screen of a window that contains transparency?
2kaud, tell me how linking to a topic that got no useful answer could help in something?
I posted on different websites because I was not finding any helpful answers.
 Originally Posted by VictorN
I already had tried BitBlc with the rasters SRCCOPY and CAPTUREBLT
Then I did GdipCreateFromHDC to retrieve the graphics from the dc, and GdipDrawImageRectRect to paint the bitmap, but it result in a bitmap without any transparency.
Last edited by c7aesa7r; January 20th, 2022 at 10:08 AM.
-
January 20th, 2022, 11:25 AM
#5
Re: How to capture the screen of a window that contains transparency?
@c7aesa7r - It is good etiquette to indicate where else it has been posted. This enables any potential reply-er to find out what has already been suggested before spending time replying or looking into the issue. People who reply do it in their own time without payment - just to try to help others.
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
October 23rd, 2022, 01:22 AM
#6
Re: How to capture the screen of a window that contains transparency?
There are a few ways to capture the screen of a window that contains transparency. One way is to use the Snipping Tool. Another way is to use the Print Screen function.
-
October 27th, 2022, 10:44 AM
#7
Re: How to capture the screen of a window that contains transparency?
 Originally Posted by Hacon
There are a few ways to capture the screen of a window that contains transparency. One way is to use the Snipping Tool. Another way is to use the Print Screen function
Neither Snipping Tool nor Print Screen resolve the problem if the window is covered by another. Please, read carefully the original post!
 Originally Posted by c7aesa7r
Trying to find a way to capture a window that contains transparency that also works when the window is covered by another.
I tried the function [PrintWindow] but it doesn't store the transparency information in the hdc.
If possible using gdi+.
Last edited by ovidiucucu; October 28th, 2022 at 01:17 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|