+//----------------------------------------------------------------------
+
+long wxPyGetWinHandle(wxWindow* win) {
+#ifdef __WXMSW__
+ return (long)win->GetHandle();
+#endif
+
+ // Find and return the actual X-Window.
+#ifdef __WXGTK__
+ if (win->m_wxwindow) {
+ GdkWindowPrivate* bwin = (GdkWindowPrivate*)GTK_PIZZA(win->m_wxwindow)->bin_window;
+ if (bwin) {
+ return (long)bwin->xwindow;
+ }
+ }
+#endif
+ return 0;
+}
+