# Visual C++ & C++ Programming > Graphics Programming >  How to capture the screen of a window that contains transparency?

## 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+.


https://docs.microsoft.com/en-us/win...er-printwindow

----------


## VictorN

https://social.msdn.microsoft.com/Fo...orum=vbgeneral
Could it help?

----------


## 2kaud

[Also here http://www.cplusplus.com/forum/general/281832/ ]

----------


## c7aesa7r

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.




> https://social.msdn.microsoft.com/Fo...orum=vbgeneral
> Could it help?


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.

----------


## 2kaud

@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.

----------


## 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.

----------


## ovidiucucu

> 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! 




> 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+.

----------

