Addendum...
I discovered that I can obtain pointer 'p' by moving the position of const - i.e. this doesn't compile...
but this does compile...Code:void functionB() const { const Glib::RefPtr<Gdk::Window> p = canvas_event_box.get_window(); }
The problem now is that having succesfully obtained the pointer, I can't use it !!!Code:void functionB() const { Glib::RefPtr<const Gdk::Window> p = canvas_event_box.get_window(); }
My ultimate aim is to find the 'x' and 'y' co-ordinates for this window's mouse pointer:-
But the red line now gives me this errorCode:void functionB() const { gint x, y; Gdk::ModifierType state; Glib::RefPtr<const Gdk::Window> p = canvas_event_box.get_window(); p->get_pointer (x, y, state); }
error C2662: 'Gdk::Window::get_pointer' : cannot convert 'this' pointer from 'const Gdk::Window' to 'Gdk::Window &'
1> Conversion loses qualifiers![]()
![]()
![]()





Reply With Quote