Transparent window

Hi, I am trying to make a transparent window, so the objects in the scene will display on top of windows. Take a look at this: https://www.reddit.com/r/unrealengine/comments/8e8bib/question_fully_transparentclickthru_application/
This is how it looks if I use that code:


Anyone know how to fix this? Thankyou

1 Like

This works:



    const auto hwnd = GetActiveWindow();

    if (hwnd)
    {
        SetWindowLongPtr(hwnd, GWL_STYLE, WS_VISIBLE);
        SetWindowLongPtr(hwnd, GWL_EXSTYLE, WS_EX_LAYERED | WS_EX_TRANSPARENT);

        RECT rect;
        GetWindowRect(hwnd, &rect);
        SetWindowPos(hwnd, HWND_TOPMOST, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, SWP_SHOWWINDOW);

        const MARGINS margins{ -1 };
        DwmExtendFrameIntoClientArea(hwnd, &margins);
    }
    

Remove WS_EX_LAYERED if you don’t want click-through

2 Likes

Thankyou very much!

Can you guide a bit upon where this should be done? Is it in unreal ? if yes then which file or classes needed to be modified ?

Hi, any idea why this works on windows 8 but doesn’t work on windows 11 ? I haven’t tried on windows 10.

Hi!
I want to test it in Windows 10 but can’t figure out which class should I manipulate. Is it the regular SWindow in Slate? Something else?

Thanks for any clues on the implementation!

I’m trying to install the TransparentWindows plugin from the Epic Games Launcher on Unreal Engine 5.2, but the installation fails immediately with the error code MD-0011-0 and the message “Could not download installation information.”

Things I’ve already tried (no luck):

  • Cleared the Launcher WebCache and restarted.
  • Re-logged into my Epic account.
  • Disabled VPN / proxy.
  • Made sure the Launcher is on the latest version.

From what I can tell, MD-0011-0 usually means the plugin’s manifest is missing or corrupted on the Fab/Marketplace server.
Could you please re-upload or ask Epic to regenerate the manifest on their side?

Screenshot for reference is attached.

Thanks a lot for looking into this!