Re: Message Box



hi, 
   GtkWidget* label, dialog;
   in this code block you declared label as pointer but dialog is not a pointer i think u must a * to the dialog like  *dialog.


jalkadir gosonic ca wrote:
OS: MSW-XP
GTK+: 2.0.X

Hi!
In my application there are several buttons that are no active, yet. What
I would like to do is

to display "Info" Dialog Box when the user selects one of the inactive
Buttos.
I do this I have witten a function that goes like this:

void Message(){
GtkWidget* label, dialog;
dialog = gtk_message_dialog_new(
(GTK_WINDOW(TopWidget), //Parent
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, //Flags
GTK_MESSAGE_INFO, // Icon
GTK_BUTTONS_OK, // Button label
Under construction"); // Message
}

But this gives me an error that says:
main.hpp:27: error: no match for 'operator=' in 'dialog =
gtk_message_dialog_new(0u,

(GtkDialogFlags)3u, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, ((const
char*)"Under construction"))'
C:/Dev-Cpp/include/gtk-2.0/gtk/gtkwidget.h:164: note: candidates are:
_GtkWidget&

_GtkWidget::operator=(const _GtkWidget&)make.exe: *** [main.o] Error
1Execution terminated

What am I doing wrong?!! anybody?
Thanks
_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list


Yahoo! Mail
Stay connected, organized, and protected. Take the tour

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