D1233: BeginDraw Invalid From Previous Error

BeginDraw was called but will be ignored because the device context is in an invalid state.

 

Possible Causes

The application called BeginDraw, but the device context was in an invalid state from a previous operation.

Possible Fixes

Ensure that the application responds appropriately to errors returned by Flush or EndDraw, recreating its device as necessary. If a command caused a device context to be in an invalid state, the corresponding Flush or EndDraw will return an error.