MFC Components in JUCE


#1

Is anybody aware of easy ways to embed MFC components into JUCE components? Is there a tutorial available? I was not able to come across any..

I have a custom MFC slider control that took quite a while to develop and rather than re-develop it in JUCE, for the sake of timing, I want to just embed it into JUCE and spend time converting it later.


#2

I can't answer your question, as I don't think there's an easy way of combining JUCE with MFC and don't have much evidence. ...There are maybe only dozens of you MFCers roaming the software wilderness anymore!

You could try your hands at bringing the needed JUCE module cpps into your MFC project to use this: http://learn.juce.com/doc/classScopedJuceInitialiser__GUI.php

Is there a possibility that JUCE's Slider is inline with what you've written? http://learn.juce.com/doc/classSlider.php

 


#3

Just an observation: although it's possible to embed a HWND containing an MFC control in a JUCE window (or any other window), I'd expect there to be niggly minor problems with focus, keyboard handling, layout, repaint flickering, and probably other things, because of the lack of proper integration. Embedding windows is great for big items like web-browsers, openGL windows, etc, but for smaller controls like sliders, would probably be more of a pain than it's worth. Re-writing even a complex slider sounds like a not too difficult task though.. Obviously I have no idea about the details of your specific use-case, but that's my gut feeling!


#4

Thanks Jules and jrlanglois!

@jrlanglois, I have been working in a MFC+JUCE project, slowly migrating the functionality from MFC to JUCE. So far, so good. This was the first instance where I am not able to easily replace a MFC control with a JUCE control.

It's not exactly a simple slider control as so much of the functionality has been overridden and dependent on additional MFC controls. I'll stick to keeping the dialog under MFC for the time being, then!

Thanks guys,