WS_EX_LAYERED window appearing invisible over RDP

949 views Asked by At

I have developed a screen capture application for Windows using pure Win32 - no MFC or ATL.

To do this, I am using two top-level layered windows - one (entirely transparent) to capture mouse events like dragging, and another (semi-transparent) to act as a highlight rectangle. When a user is selecting the area of their screen to grab, I used SetWindowPos() to change the size and position of the semi-transparent highlight window.

This works fine on a physical device, but I have discovered that on a virtual machine (Windows 7) over RDP, my semi-transparent window doesn't show at all. I can still capture the screen, but not provide visual feedback to the user mid-capture.

I have tried altering my RDP settings to use 32bpp, but that doesn't help.

I am using:

COLORRED highlightColor = RGB(0, 0, 255);
SetLayeredWindowAttributes(hWnd, highlightColor, 255*0.6, LWA_ALPHA);

in the WM_CREATE event for my highlight window.

Does anybody know how to display a semi-transparent layered window over RDP on a VM?

0

There are 0 answers