Re: [Re: [gtkmm] Get Xwindow ID from A Gtk(mm) Window (gtkmm 2.0)]



stephan wezel <s wezel web de> wrote:
> hmm it doesn't work :(
> i can't compile it. I get following error:
> 
> main.cpp: In constructor `full::full()':
> main.cpp:356: cannot convert `_GdkDrawable' to `GdkDrawable*' for argument
`1' 
>    to `XID gdk_x11_drawable_get_xid(GdkDrawable*)'
> make: *** [main.o] Fehler 1

You might need to #include a gtk header. gtk.h would get you everything you
need.

> When i use 
> GDK_WINDOW_XID((get_frame()->gobj())); in place of 
GDK_WINDOW_XID(*(get_frame()->gobj()));
> is can compile it. 
> But when i want to start the programm, i become a Memory access error.

You should probably check the result of get_frame() for null.
e.g.
Glib::RefPtr<Gdk::Window> refWindow = get_frame();
if(refWindow)
  ... GDK_WINDOW_XID( refWindow ->gobj() );

However, I've never heard of get_frame(). I would have tried get_window()
first. But I never do this stuff.


Murray Cumming
murrayc usa net
www.murrayc.com





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]