Capturing the screen image with BitBlt


In my application a window is created with WS_POPUP and the flags WS_EX_LAYERED and WS_EX_TRANSPARENT. The alpha value is set to 0xFF with the API SetLayeredWindowAttributes. The windows is displayed and set as topmost using the flag HWND_TOPMOST and the API SetWindowPos. The result is a full screen window which cover all the desktop content. However using BitBlt (with the flag SRCCOPY) the application is able to capture the content behind the full screen window (just like if the window has never been created). This was the behavior on Windows 7 and earlier operating system. 

Unfortunately starting from Windows 8 this mechanism stopped working. More precisely the BitBlt call returns the full screen window image instead of the content behind it. Can you suggest an alternative way to achieve this behavior on the  Windows 8 and Windows 10 ?

Related Conversations
Preview image doesn't appear on chat
Batuhan Akpunar in Microsoft Teams on
1 Replies
teams not showing office documents
Steven Davidson in Microsoft Teams on
2 Replies
IncomingWebhook image display
Daisy_1112 in Microsoft Teams on
0 Replies
Image being replaced
Deleted in Office 365 on
3 Replies