用C语言怎么编图形界面
请问用C语言可以编写图形界面吗?有没有这方面的教程推荐几本,谢谢!!
#include <gtk/gtk.h> int main( int argc, char *argv[]) { GtkWidget *window; GtkWidget *label; char *str = "hello world !"; gtk_init(&argc, &argv); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); g_signal_connect_swapped(G_OBJECT(window), "destroy", G_CALLBACK(gtk_main_quit), NULL); label = gtk_label_new(NULL); gtk_label_set_markup(GTK_LABEL(label), str); gtk_container_add(GTK_CONTAINER(window), label); gtk_widget_show(label); gtk_window_set_default_size(GTK_WINDOW(window), 300, 100); gtk_widget_show(window); gtk_main(); return 0; }