title: How can I create new window in GTK after click?
body: <p>I'm new at GTK, and I was wondering how can I create a new window after a click button. I've got this function </p>
  
  <pre><code>void cb_create_entry(GtkWidget *, gpointer);
  
  int create_window(int argc, char *argv[]){
  GtkWidget *p_window = NULL;
  GtkWidget *p_main_box = NULL;
  
  GtkWidget *p_button[5];
  
  gtk_init (&amp;argc, &amp;argv);
  
  //Create window
  p_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  
  gtk_window_set_title(GTK_WINDOW(p_window), "Hello");
  gtk_window_set_default_size(GTK_WINDOW(p_window), 320, 200);
  
  p_main_box = gtk_vbox_new(TRUE, 0);
  gtk_container_add(GTK_CONTAINER(p_window), p_main_box);
  
  {
    p_button[0] = gtk_button_new_with_label("Create entry");
    g_signal_connect(G_OBJECT(p_button[0]), "clicked", 
    G_CALLBACK(cb_create_entry), NULL);
    gtk_box_pack_start(GTK_BOX(p_main_box), p_button[0], FALSE, FALSE, 0);
  }
    gtk_widget_show_all(p_window);
  
    gtk_main ();
  
    return EXIT_SUCCESS;
  </code></pre>
  
  <p>and callback.h</p>
  
  <pre><code>#ifndef CALLBACK_H_INCLUDED
  #define CALLBACK_H_INCLUDED
  #include &lt;gtk/gtk.h&gt;
  
  void cb_create_entry(GtkWidget *p_widget, gpointer user_data){
  gtk_button_released(p_widget);
  GtkWidget *p_window;
  GtkWidget *p_v_box;
  GtkWidget *p_entry;
  
  p_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title(GTK_WINDOW(p_window), "Create DB");
  gtk_window_set_default_size(GTK_WINDOW(p_window), 320, 200);
  
  p_v_box = gtk_vbox_new(TRUE, 0);
  gtk_container_add(GTK_CONTAINER(p_window), p_v_box);
  
  p_entry = gtk_entry_new();
  gtk_box_pack_start(GTK_BOX(p_v_box), p_entry, TRUE, FALSE, 0);
  }
  </code></pre>
  
  <p>and main</p>
  
  <pre><code>int main(int argc, char const *argv[]) {
  create_window(argc, argv);
  return 0;
  }
  </code></pre>
  
  <p>But it doesn't work. I'd like to create a new window with an input. But when I click on button, nothing happens.</p>