Message Box

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Message Box

jalkadir
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
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: [Dev-C++] Message Box

Per Westermark
I don't know anything about gtk, but let me guess:

Your linke:
    GtkWidget* label, dialog;
should look like:
    GtkWidget *label,*dialog;

It should be noted that when declaring variables, the * always binds
right, i.e. to the variable and not to the type!

/Per W

On Mon, 6 Jun 2005 [hidden email] 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
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
> a projector? How fast can you ride your desk chair down the office luge track?
> If you want to score the big prize, get to know the little guy.
> Play to win an NEC 61" plasma display: http://www.necitguy.com/?r
> _______________________________________________
> Dev-cpp-users mailing list
> [hidden email]
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>

_______________________________________________
gtk-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: Message Box

tyf ygrk
In reply to this post by jalkadir
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.


[hidden email] 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
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-list


Yahoo! Mail
Stay connected, organized, and protected. Take the tour
_______________________________________________
gtk-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-list