Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When should WS_EX_NOREDIRECTIONBITMAP be used?

MSDN says (Extended Window Styles):

WS_EX_NOREDIRECTIONBITMAP: The window does not render to a redirection surface. This is for windows that do not have visible content or that use mechanisms other than surfaces to provide their visual.

What does in this case "window render to a redirection surface" vs "mechanisms other than surfaces" mean? Which of these: GDI, D3D9, D3D11, D3D12 count as the former vs the latter? Am I supposed to use this extended window style when I'm just drawing using Direct3D?

like image 716
Sunius Avatar asked Jul 04 '16 07:07

Sunius


1 Answers

WS_EX_NOREDIRECTIONBITMAP is for windows that use DirectComposition for rendering.

E.g. Sciter creates windows with WS_EX_NOREDIRECTIONBITMAP to support Acrylic composition effects like here:

enter image description here

This is an ordinary Win32 window (not UWP) that uses DirectComposition and WS_EX_NOREDIRECTIONBITMAP.

Rendering on such windows should be done by Direct2D means. GDI rendering is barely useful with WS_EX_NOREDIRECTIONBITMAP.

like image 69
c-smile Avatar answered Sep 20 '22 21:09

c-smile