Re: Embed movie player using mplayer - How to get the wid on Windows?



Hi everybody,

With the help of all of you I manage to get the window ID on windows. The line that works is:

Glib::RefPtr<Gdk::Window> window = get_window();
windowID = (int)GDK_WINDOW_HWND(window->gobj());

Thanks for the help,
P.F.Smorigo

On Thu, Aug 21, 2008 at 11:37, Hubert Figuiere <hub figuiere net> wrote:
On Thu, 2008-08-21 at 09:27 -0500, Jonathon Jongsma wrote:
> > I withdrew the unwrap function from the code and the line now is:
> >
> > *p_windowID = GDK_WINDOW_HWND(get_window());
> >
> > I saw in this form looking into a code found on the internet.
> >
> > Now the error is:
> > gui/VideoGui.cpp:32: error: cannot convert
> `Glib::RefPtr<Gdk::Window>'
> > to `GdkDrawable*' for argument `1' to `void*
> > gdk_win32_drawable_get_handle(GdkDrawable*)'
> >
> > I tried to cast but the error continues...
> >
> > Thanks...
> > P.F.Smorigo
> >
>
> you seem to have missed the part where he told you to use gobj().
> e.g.
> get_window()->gobj()

And the part where I tell to check the definition of HWND.
p_windowID should be declared as a HWND*, as HWND isn't an int but more
likely (according to the error message) a void*. This is not Gtkmm
specific at all.



Hub




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