Re: GTK+ PopUp Window make it Transparent...




#define _WIN32_WINNT 0x0500
#define WINVER 0x0500

#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <gdk/gdkwin32.h>
#include <cairo.h>

int main(int argc, char **argv)
{
        gtk_init(&argc, &argv);
        GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
        gtk_window_set_title(GTK_WINDOW(window), "Splitting Test");
        g_signal_connect(G_OBJECT(window), "delete-event", gtk_main_quit, NULL);
        gtk_widget_show_all(window);


        // Alpha Blending
        //HWND hwnd = (HWND)gdk_win32_drawable_get_handle (window->window);
        //SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) |
WS_EX_LAYERED);
        //SetLayeredWindowAttributes(hwnd, 0, (255 * 60) / 100, LWA_ALPHA);

        // Color Keying
        //HWND hwnd = (HWND)gdk_win32_drawable_get_handle (window->window);
        //SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) |
WS_EX_LAYERED);
        //SetLayeredWindowAttributes(hwnd, RGB(255,255,255), 0, LWA_COLORKEY);
        
        gtk_main();

        return 0;
}

Do u think that we can patch this small hack into GTK cause is very usefull
for GTK+Win32 user :)
I will look at irc now :)
-- 
View this message in context: 
http://www.nabble.com/GTK%2B-PopUp-Window-make-it-Transparent...-tf2139080.html#a5904712
Sent from the Gtk+ - Apps Dev forum at Nabble.com.




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