Using Juce when i already have another message loop

Hi

I’m trying to get the audio part of Juce to work in a .net application, i have most of the things wrapped and working but i have some problems with the MessageHandler.

I can see that the MessageHandler uses the windows main loop (at least on the windows platform) to post messages, to send messages you, of course, need a window handle. My problem is that the message loop is handled by .net and i can’t let Juce handle creation of that handle.

Is there an “easy” way to get Juce to use another window handle, i think i can hack it in without too much fuss, but i do not have the insight to tell if this will work.

Can anybody shed some light on this?

It should just work - Juce doesn’t need to own the message loop, it’ll just use the one that’s running (like it does when you’re using it in a plugin). Just make sure you’ve initialised everything properly, like the plugin code does.

It seems you are right, you just need to make sure to intialize Juce on the UI thread.

Actually i missed the Initialise_Juce* methods completely, they are not that easy to “stumble upon” when trying to get an overview of Juce using the doxygen documentation.

Not sure how it could be done better, perhaps a small introduction on the frontpage of the doxygen saying that most people should just use JUCEApplication - but people who want to use Juce as a dynamically loaded plugin should take a look at the Initialise_Juce* functions.

Anyway, i think i got everything working now, thanks for the help.