Transparent window on windows 11

This code works on windows 8 when using RHI SM5 and ES31, but on windows 11 only with vulkan, this means I have to distribute two distinct versions. Not tested on w 10. I am using Unreal Engine 4.27. Any idea how to fix this ?

  DwmExtendFrameIntoClientArea(hwnd, &margins);
  SetLayeredWindowAttributes( hwnd, 0x00000000, FMath::TruncToInt( 1 * 255.0f ), LWA_ALPHA );
1 Like

you can see this video