I have a problem wrapping my head around the addToDesktop method on win32.
I need to attach a JUCE window to an already created native window. From what I gather from the source code the way it works is JUCE doesn’t take over that native window but rather it creates a child window and “parents” it to that native window. Unfortunately if I try to call GetParent((HWND) mainWindow->getWindowHandle()) I get 0. spy++ doesn’t show any parent/owner either.
The native parent window is WS_POPUP. Nothing particular about it.
The JUCE window is of class TopLevelWindow. Could this be the cause? Should I use another class instead? The main window constructor passes (“title”, false) to the TopLevelWindow constructor.
The other thing I’m concerned with is that I think UpdateLayeredWindow cannot be used to draw child windows, only the top level ones (right ?). So I guess there’s something more I need to do to prevent JUCE from trying to use that method on a child window as long as it’s not windows 8.
But first things first - I need to get that window actually attached to the host app’s window.
Would anyone care to point me in the right direction ?