I guess it's a long shot asking here but well...I am trying to see if it's possible to do a Reaper extension plugin with a JUCE-based GUI, but so far I am getting suboptimal results. Depending on what I have in the code, the plugin's GUI either shows as a new top level window or gets "intermingled" in Reaper's GUI, showing completely corrupted graphics. Although the first mentioned way shows the GUI uncorrupted, it's completely unusable since the plugin window disappears when Reaper's own GUI is clicked and the plugin window has to be activated from the Windows taskbar to get it back. Setting Stay-on-top on the plugin dialog component keeps the plugin GUI visible, but has the downside the plugin isn't hidden when Reaper itself is minimized or put in the background, so not ideal to use that either.
I've tried MANY different variations of Component::addToDesktop, win32 API SetParent, as well as SetWindowLongPtr with GWL_STYLE/WS_CHILD and GWL_EXSTYLE/WS_EX_TOOLWINDOW(*), with different parameters, calling the APIs in different orders, but none produces the desired result : a tool window that stays visible and disappears together with Reaper when it is minimized or put in the background. With regards to Reaper, the primary thing I have to work with is the HWND of its main window. I am assuming I somehow must make the JUCE GUI be parented to that HWND. (That is how I have gotten it to work if the plugin GUI uses raw winapi or the Qt framework.)
So if by any chance someone would have any ideas on how to approach this further...(I know this is a fringe use case, so I am not really asking Jules to fix/change anything in JUCE to make this possible, unless it would have side benefits to more people.)
(*) Getting the HWND for the win32 API calls by using (HWND)dlg->getPeer()->getNativeHandle()