Hi,
Gtk::Window *window = new Gtk::Window();
Gdk::Window* gw = dynamic_cast<Gdk::Window*>(window);
this will most likely result in a NULL pointer causing the program to
segfault as soon as it gets dereferenced. The way to get the underlaying
Gdk::Window of a Gtk::Widget is to call Gtk::Widget::get_window().
However, the Gdk::Window is not allocated at this point in the code
(because GTK does not yet know how much space it has to allocate for
your widget) and the function mentioned above will return NULl as well.
You could connect a signal handler to the realize signal and execute
your code there - at this point, Gdk::Windows should be allocated.
- Armin
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list