Re: [gtk-win32] Object Handle



lee designrealm co uk writes:
 > I'd like to embed a control into a GTK window that accepts a Windows  
 > native id as an HWnd for its placement. How do I aqcuire a windows  
 > control handle from GTK 

I don't know what you mean with "control handle". You can get the
*window* handle for a GDK window using the function
gdk_win32_drawable_get_handle() that takes a GdkWindow* as
parameter. Include <gdkwin32.h> to get the prototype:

/* Translate from drawable to Windows handle */
HGDIOBJ       gdk_win32_drawable_get_handle (GdkDrawable *drawable);

But please note that it is questionable whether "embedding a control"
into a GTK window will work. It will be much hairier than you expect.

 > and what control would be best used for adding the control.

What you really are asking is how to embed a widget or "control"
written in another toolkit in a GTK+ widget? I have never done this. I
think some people have managed to call the Windows file selector from
GTK+. But that control has its own top-level window. I don't know if
anybody have managed to embed a control in a GTK+ window.

--tml




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