| Previous | Next |
| D2DERR_WIN32_ERROR | D2DERR_TEXT_EFFECT_IS_WRONG_TYPE |
D2DERR_TARGET_NOT_GDI_COMPATIBLE
D2DERR_TARGET_NOT_GDI_COMPATIBLE means that the selected Direct2D render target was not created with the requirements needed for GDI interoperability. A general Direct2D target is not automatically usable with GDI.
What to check
- Create the target with the documented GDI-compatible usage or options when GDI interop is required.
- Use a compatible render-target type instead of attempting interop through an arbitrary target.
- Separate GDI and Direct2D rendering paths when the target cannot support both.
Changing the HDC alone will not make an incompatible Direct2D target GDI-compatible.
Microsoft: Direct2D error codes
Looking for a different code? Search another status or error code.