Drag/drop notifications with child window

I have a WebBrowserComponent as a child of a frame window (DocumentWindow) that inherits FileDragAndDropTarget. I’d like to get drag/drop notifications for items dragged onto both the window and the web browser, but Juce only passes the events for the exposed portion of the parent window.

If I build the same app construct in MFC, I get the events for the browser too. Note that in both cases I have called put_RegisterAsDropTarget(FALSE) on the underlying ActiveX control to prevent the browser from grabbing the events.

Is there any way to get Juce to pass those events to me like MFC does?

Well, those events wll go directly to the embedded window, so it’s not a surprise that juce doesn’t get a look at them.

I suppose there might be a way of making the event loop snoop on any drop events before they get delivered and send them to the juce window instead, but it’d be a hell of a bodge. The best way would be for the embedded control to forward any unwanted events up to its parent, but if that’s not what it does, I don’t know how you’d persuade it to do that.

Thanks. I had a feeling that was the case. I did just discover the IDocHostUIHandler interface on windows, which can probably do the job. The WebView on mac gets the events already, if you inherit from it. I’ll probably just have to hack WebBrowserComponentInternal to get it in there for both plaforms, but FWIW it would be cool to have this built in. It potentially enables desktop-integrated cross platform web apps like Adobe AIR to be built.