0

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?

BeneGal
  • 180
  • 1
  • 11
  • Does the RDP session have all the display features (such as desktop composition) enabled? Some functionality might be degraded if not. –  Jul 23 '13 at 16:00
  • Yes, all features enabled. For example, using Remote Desktop Connection on Windows, all features under the Experience tab have been selected, as well as 32bpp. These include Desktop composition, Show window contents while dragging, Visual styles, Menu and window animation... – BeneGal Jul 23 '13 at 16:09
  • Have you verified that all layered window related calls you're making are succeeding? In my experience layered windows can be quite finicky about when and how they work. :) –  Jul 23 '13 at 16:17
  • Per-pixel alpha without hardware support is difficult, confirmed [here](http://blog.duck17.net/post/Per-pixel-Alpha-Blending-in-Native-Win32-API.aspx) – Hans Passant Jul 23 '13 at 16:50
  • Having spent some more time debugging, I've discovered that the semi-transparent window **does** show on a VM over RDP when I use the alternative keyboard input I had prvodided. I think I've established now that the problem may be due to the remote cursor, because my transparent window doesn't seem to be receiving mouse move, or mouse click messages. Any issues from here onwards probably aren't really related to this question any more, but thanks everyone for your help. – BeneGal Jul 24 '13 at 12:22

0 Answers0