Jeremiah Cornelius McCarthy wrote:

> I'm tring to create a wxWindows interface for embedding mozilla and I'm
> having the below error printed when I go to Create a baseWindow.  
> 
> .Warning: The parent container of this widget is not realized.  I'm going to
> crashvery, very soon.
> 
> I'm tring to bind to gtk event box which is binded as a child of wxWindows
> Frame class.  Is this possible?  I'm not entirely sure, and can't find
> adequate documentation on what the specifics are of the window that mozilla
> must bind itself to.

I'm also embedding Mozilla (GTK+ only) into a wxWindows-based app, but I think
I'm doing this in a different way as I haven't seen this error message.  I'm
doing a hacky subclass of wxHtmlWindow, and I've had to do various tricks to
get it to work.

I'll mention one of them now, as I suspect sooner or later you are going to run
into the problem I had which is that the whole kit and kaboodle hangs when the
embedding widget is realized.  The problem is that wxWindows grabs the GTK+
thread lock during initialization and never releases it.  I got around this by
explicitly realizing the embedding widget myself with code like:

   gdk_threads_leave();
   gtk_widget_realize(mozEmbedWidget);
   gdk_threads_enter();

This is no doubt highly dubious, but I'm not GTK+ expert, and it worked for
me.

Reply via email to