GTK 3.0弹出窗口及设置背景图片的代码
代码如下:#include <gtk/gtk.h>
int main(int argc,char *argv[])
{
gtk_init(NULL, NULL);
GtkWidget* window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
//设置大小,弹出位置,图标,等等
gtk_signal_connect(G_OBJECT(window),"destroy", G_CALLBACK(gtk_main_quit),NULL);
GtkWidget* image=gtk_image_new_from_file("your pictrue");
gtk_container_add(GTK_CONTAINER(window), image);
gtk_widget_show_all(window);
gtk_main();
return 0;
}
文档来源:51CTO技术博客https://blog.51cto.com/u_13161667/3301541
页:
[1]