Displaying a web-browser on top of a document window

Hi all,

I want to display a web Browser on top of the document window(i.e. document window should hold the browser). I can do that on pc using “juce::ActiveXControlComponent” . This is what i have done


juce::ActiveXControlComponent*	  control_;
IWebBrowser2*				browser_;

bool
Initialise ()
{
	if ( control_->createControl (&CLSID_WebBrowser) )
	{
		browser_ = (IWebBrowser2*) control_->queryInterface ( &IID_IWebBrowser2 );
		init = browser_ != 0;
		return init;
	}
}

is there any way i can display web browser on mac.

thanks in advance for reply.

Are you using an old version of the code? There’s been a cross-platform WebBrowserComponent in there for a while now!

am using juce 1.45, it doesn’t show up in the documentation.

Anyway thanks Jules, i think it would be helpful.

I was able to display a web browser using WebBrowserComponent but there were few issues which I would like to discuss. Am using juce_1.46(June 17, 2008).

  1. if i minimise the window and restore the window certain portion of the “WebBrowserComponent” is clipped, which could be repaint issue

  2. The scroll buttons and scroll bars are native can it be customized.( not sure if it can be done)

Thanks and Regards,
Vishvesh

Well repaint issue is solved, i took the latest code from svn and it worked fine. Am working on the scroll buttons.

Yes, those repaint issues were a problem with the old carbon web view - the tip uses cocoa so it’s all fine.

Don’t really think you can customise anything inside the browser, unless you want to get your hands dirty and start tinkering with cocoa classes…

I have given up on scroll buttons :D. There is another issue with the WebBrowserComponent.

If I right click on any links in the web- page being displayed a pop-up menu is displayed. If I move the mouse over the menu the cursor turns into a beach ball(which indicates that the application is hanging) but the menu is responsive. Can this be fixed.

…works just fine for me (?)

Again, that’s something that used to happen in the old carbon-based version, but the tip shouldn’t suffer from it.

I hadn’t taken the entire code from the tip i ll do it right away. Thanks again