Displaying a web-browser on top of a document window


#1

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.


#2

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


#3

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


#4

Anyway thanks Jules, i think it would be helpful.


#5

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


#6

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


#7

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…


#8

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.


#9

…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.


#10

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