There is material online that explains how to do this but most of it is either quite outdated, very hacky or both. I’m hoping that someone here might be able to share some insight on whether what I want to do is possible and what the best way of doing it would be in a modern context.
So, you create the window using the native widgets library, then use that library’s method for accessing the native window handle and pass it to SDL when creating the SDL window.
For SDL 3, use SDL_CreateWindowWithProperites, setting the required property to pass in a native window handle for the operating system you’re running on.
I’ve tried this with WXWidgets and SDL3 and it seems to work great so far. Once you have a WXFrame you can call getHWND on it and then pass that to SDL3 and everything will “just work”. I’ve not got particularly far with this yet so there might be gotchas.
I expect the next most significant challenge will be writing a custom event loop for WXWidgets to allow SDL to redraw at a reasonable tempo.