As far as I can tell, the only way to create new windows through swell, is by using CreateDialog.
To create a blank top-level, modeless windows, I therefore tried:
Code:
hwnd = CreateDialog(nullptr, MAKEINTRESOURCE(0), nullptr, myWinProc);
SetWindowLong(hwnd, GWL_STYLE, WS_CAPTION|WS_THICKFRAME|WS_SYSMENU);
SetWindowText(hwnd, title);
SetWindowPos(hwnd, HWND_TOPMOST, x, y, w, h, SWP_SHOWWINDOW | SWP_NOCOPYBITS);
ShowWindow(hwnd, SW_SHOW);
where myWinProc mostly just passes every message on to DefWindowProc.
On Linux, this works fine. On macOS, however, the newly created window remains below all other REAPER windows except the main window. Even if I try SetForeground, the window doesn't come to the foreground.
I am doing something wrong?
(EDIT: Cross-posted to the
ReaScript/Developer forum, since that forum is more active.)