Download

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: https://answers.unrealengine.com/storage/temp/256084-transparency.jpg
Anyone know how to fix this? Thankyou

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

Hi, did you made these changes in editor source code or project source ?