I am trying to set the WS_EX_LAYERED extended window style on an external Adobe Air application. See this question if you want to know why. The problem I am facing is that as soon as I set the style, the window stops rendering. Here's the my code:
auto style = GetWindowLong(hwnd, GWL_EXSTYLE);
SetWindowLong(hwnd, GWL_EXSTYLE, style | WS_EX_LAYERED);
// If I skip the next line, the window is suddenly white.
// With the next line, the image in the window freezes.
SetLayeredWindowAttributes(hwnd, 0, 255, LWA_ALPHA);
The window continues to work perfectly fine (clicks etc.), it just doesn't get redrawn anymore (f.e. when resized).
The window does not have the CS_OWNDC
or CS_CLASSDC
style.
Can anyone tell me what the reason could be?
InvalidateRect()
andUpdateWindow()
without success.RedrawWindow()
doesn't help either. – Blockhead