I’m working on a VST3 plugin that will host a third-party plugin. It would be nice if my plugin’s editor had a window that displays a small preview of the hosted plugin’s editor (clicking the window would open the full-size editor). It would be really nice if the preview window showed the editor’s current state, but I would be satisfied with just a static snapshot of it - its purpose would mainly be just to indicate what the hosted plugin is. Does Juce have any tools that could help achieve this?
Presumably you must get some reference to an
AudioProcessorEditor for your hosted plugin? In which case you could probably do something involving createComponentSnapshot.
Not entirely sure though as I’ve never worked with hosting plugins.
Thanks @richie ! I think createComponentSnapshot is indeed the tool I’m looking for
Unfortunately, I think that only works for Juce components handled by your own program. (3rd party plugin GUIs of course don’t necessarily use Juce at all, but even if they do, they are not visible as Juce Components for the host.)
You need to take a screenshot of the desktop, know where the plugin UI is and then crop the screenshot to that area. This came up a while ago, somebody ended up posting a screenshot library: Screen capture desktop