Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
383 views
in Technique[技术] by (71.8m points)

c++ - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...