I'm using pygtk + vtk on win32 with python 2.1

I want to be able to use the vtkGTKRenderWidget.py (from vtk) to embed a vtk
render window into a gtk app the same way that is done on X11.
(I have been asked to port a pygtk + vtk app from linux to win32)

The widget it using
win_id = str (self.box.get_window ().xid)
self._RenderWindow.SetParentInfo (win_id)

According to Prabhu Ramachandran:

>Indeed, the xid wont work under Win32.  Since I am fortunate not to use 
>windows ;) I did not check the widget under win32.  I'd appreciate
>if you could test to see if there is some method/attribute that pygtk
>provides under win32 that produces the HWND that MSW provides for the
>window.  If it is possible (which I think it should) it should be easy
>to fix this bug.

>It might be as simple as replacing 

>str (self.box.get_window ().xid)
>with 
>str (self.box.get_window ().hwnd)

>but I am not sure.

Ok, so looking at the pygtk sources I see that in PyGdkWindow_GetAttr:
#ifdef WITH_XSTUFF
    if (!strcmp(key, "xid"))
        return PyInt_FromLong(GDK_WINDOW_XWINDOW(win));
#endif

So is there a way I can get the HWND I need fro win32?

David

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to