Share via

D2DERR_RECREATE_TARGET and InvalidateRect() in Direct2D 1.1

thebluetropics 1,046 Reputation points
2022-09-07T08:47:03.067+00:00

In Direct2D 1.0, I can check whether the EndDraw() method of ID2D1HwndRenderTarget returns an D2DERR_RECREATE_TARGET to discard all device-dependent resources and then reinitialize them.

In Direct2D 1.0, I can do InvalidateRect() everytime I want to update the client area

What is the equivalent method to do the same thing in Direct2D 1.1?

Windows development | Windows API - Win32
Developer technologies | C++
Developer technologies | C++

A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.

0 comments No comments

Answer accepted by question author

Castorix31 91,871 Reputation points
2022-09-07T09:14:21.433+00:00

These parts of code don't change
They are just done on ID2D1DeviceContext instead of ID2D1HwndRenderTarget

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.