Direct2D window black when not in focus

Posted by Saul Rennison on Stack Overflow See other posts from Stack Overflow or by Saul Rennison
Published on 2010-04-09T14:32:25Z Indexed on 2010/05/30 7:12 UTC
Read the original article Hit count: 349

Filed under:
|
|
|
|

Hi all,

I have a Direct2D window which paints fine when in focus; however, when focus moves to another window (same application or another), the entire window goes black. I pinned the issue down to the use of ID2D1HwndRenderTarget::Clear. This function is vital to my application as without it, painting becomes rather... weird.

Is there a way an un-focused Direct2D window can paint as normal (note: WM_PAINT is being called as usual, as is Clear, BeginPaint, etc. all without error)

Thanks in advance.

© Stack Overflow or respective owner

Related posts about c++

Related posts about Windows