Re[2]: [PHP-GTK] Win32 modal support

From: Date: Tue, 30 Aug 2005 01:00:18 +0000
Subject: Re[2]: [PHP-GTK] Win32 modal support
References: 1 2  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-6184@lists.php.net to get a copy of this message
Hi, A slightly better version that allows the keyboard input when not modal. gdk_window_set_transient_for() in ...\gtk\gdk\win32\gdkwindow-win32.c gdk_window_set_transient_for (GdkWindow *window, GdkWindow *parent) { HWND window_id, parent_id; LONG style; g_return_if_fail (window != NULL); g_return_if_fail (GDK_IS_WINDOW (window)); GDK_NOTE (MISC, g_print ("gdk_window_set_transient_for: %p %p\n", GDK_DRAWABLE_XID (window), GDK_DRAWABLE_XID (parent))); window_id = GDK_DRAWABLE_XID (window); parent_id = GDK_DRAWABLE_XID (parent); if ((style = GetWindowLong (window_id, GWL_STYLE)) == 0) WIN32_API_FAILED ("GetWindowLong"); style |= (WS_POPUP | WS_TABSTOP); if (!SetWindowLong (window_id, GWL_STYLE, style)) WIN32_API_FAILED ("SetWindowLong"); if (!SetParent (window_id, parent_id)) WIN32_API_FAILED ("SetParent"); if (!SetWindowPos(window_id, HWND_TOP, 0, 0, 0, 0, // ignores size arguments SWP_NOSIZE)) WIN32_API_FAILED ("SetWindowPos"); } -- regards, Tom

« previous php.gtk.general (#6184) next »