Help me please



// The  label is not setting text why ???? please help me //
#include <iostream>
#include <gtk/gtk.h>
#include <string.h>
using namespace std;
void say();
void says();

int main(int argc, char ** argv)
{
    gtk_init(&argc, &argv);
    GtkBuilder* bi = gtk_builder_new();
    gtk_builder_add_from_file(bi, "ui.glade", NULL);
    GtkWidget* window = GTK_WIDGET(gtk_builder_get_object(bi, "window"));
   
    GtkWidget* label = GTK_WIDGET(gtk_builder_get_object(bi,"label"));
   
    GtkWidget* button1 = GTK_WIDGET(gtk_builder_get_object(bi, "button1"));
    GtkWidget* button2 = GTK_WIDGET(gtk_builder_get_object(bi, "button2"));   
   
   
   
    g_signal_connect (button1, "clicked", G_CALLBACK (say), (gpointer) "cool button");
    g_signal_connect (button2, "clicked", G_CALLBACK (says), (gpointer)"cool button");
    string* lab;
    string st = "hai";
    lab = &st;



    /// SIgnals
    gtk_widget_show(window);
    gtk_main();
}

void say()
{
    cout<<"Hai nalin\n"<<flush;
    void gtk_label_set_text(GtkLabel label, const gchar st);

    //entry.set_text("hai");
}

void says()
{
    cout<<"Hai praveen\n"<<flush;;
}


--
Mob : +91 8281029215
           +91 8281024216
           +91 9446012215
           +91 9446012216

FREE
SOFTWARE FREE SOCIETY





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