Q:

How to convert HWND to SDL_Window?

I'm making an SDL2 application to draw on a separate processes window. The process doesn't use SDL but I can get the HWND of the process window. Is it possible to get an SDL_Window from the HWND?

A:

It's as simple as:
SDL_Window *window = SDL_CreateWindowFrom(my_hwnd);

But as noted in comments, rendering into such window may or may not work properly.

