Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to correctly apply WS_EX_NOREDIRECTIONBITMAP to a QWindow on Windows for transparency?
Forum Update on Monday, May 27th 2025

How to correctly apply WS_EX_NOREDIRECTIONBITMAP to a QWindow on Windows for transparency?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 46 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    froxy
    wrote last edited by
    #1

    Hello everyone,

    I'm working on a Qt application for Windows where I need to achieve high-performance per-pixel alpha transparency for a QWindow subclass that I'm rendering into using a custom Direct3D/DXGI setup (similar to approaches using QQuickRenderControl or direct rendering).

    From my research (https://learn.microsoft.com/en-us/archive/msdn-magazine/2014/june/windows-with-c-high-performance-window-layering-using-the-windows-composition-engine), it seems essential for high-performance transparency via the Windows Composition Engine (DirectComposition) to create the underlying native window (HWND) without the default opaque redirection bitmap allocated by the DWM. This is typically done by including the WS_EX_NOREDIRECTIONBITMAP extended style when calling CreateWindowEx.

    My challenge is applying this specific style when using a QWindow. Since Qt manages the creation of the native HWND internally, I'm unsure of the correct way to ensure WS_EX_NOREDIRECTIONBITMAP is present during the CreateWindowEx call made by Qt's Windows platform plugin.

    Could anyone provide guidance on the recommended or correct way to apply WS_EX_NOREDIRECTIONBITMAP to a QWindow in a Qt application on Windows? Is there a specific Qt-provided API, a standard pattern for influencing native window creation parameters, or does it require a more involved platform-specific approach?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote last edited by SGaist
      #2

      Hi,

      From a quick look at the code, I would say that you'd need to build a custom windows platform plug-in to add that parameter.
      That said, did you check the new QRhi classes ? They might provide something that fits your need.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved