Modal window in a dll


#1

I’ve got a modal window that’s shown from a dll. When it’s shown, the host application’s main window can still be focused. Both dll and application are written in Juce.

Is there a way to change this, to make the modal window more part of the application?


#2

Your modal window doesn’t block the main window at all, you can interact with both at the same time and your modal window doesn’t seem to have modal behavior at all?

How do you link the .dll and the .exe with JUCE? Do you staticlink each with a static version of JUCE or dou you dynamiclink them against the same juce.dll?

Because JUCE handles modal state on its own it keeps a stack of modal components. If you link your .dll and .exe against a static version of JUCE your .dll and .exe will have a seperate version of this stack, which is a possible cause for your problem. If you link against a common juce.dll there should be only one instance of the modal component stack.

So if you link static against JUCE you should compile JUCE as DLL and link against it from your .dll and .exe and see if that helps.


#3

I just found the modal stack variable in the code :slight_smile:

You’re right, I link both statically and so they don’t share that stack. I’ll have to see if I can find a way around that. The Juce dll idea is nice, but something I’d like to avoid all the same (the dll will actually be used in non-Juce apps too).