Insert an image into a gtk_window
- From: ferri_marllo gva es
- To: gtk-devel-list gnome org
- Subject: Insert an image into a gtk_window
- Date: Mon, 4 Sep 2006 12:07:14 +0200
I'm trying to insert an image in a window creted with gtk.
The problem is that the image doesn't appear efter executing,and there'not an
error message.
Can you help me??
#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
int main(int argc,char **argv)
{
GtkWidget *window;
GtkWidget *image;
GdkPixbuf *pixbuf;
gtk_init(&argc,&argv);
window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
g_signal_connect(G_OBJECT(window),"destroy",gtk_main_quit,NULL);
image=gtk_image_new_from_file("c:\\Projects\\logoceam2.bmp");
gtk_container_add(GTK_CONTAINER(window),image);
gtk_widget_show_all(window);
gtk_main();
return(0);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]