Re: displaying an image in gtk using visual c++



On Sun, 2007-02-25 at 10:05 -0800, lucks wrote:
> hi...i would be much grateful if someone could help me in displaying an
> image..am using the following code:
> 
> void
> on_bt_test_clicked                     (GtkButton       *button,
>                                         gpointer         user_data)
> {
>        GtkWidget *img_objectdesign;
>   	img_objectdesign = gtk_image_new_from_file ("baby.jpg");
>   	gtk_widget_show (img_objectdesign);
> 	
> }
> 
> 
> 
> if someone can help me in the coding(in visual c++)
> 
> thanks

You want to ask this question on the app-devel list, not the devel list
- which is for development of GTK itself.

If someone is to help with your request, they will also probably require
some information about where you're stuck, or what doesn't work the way
you expect.

For example, the code you've posted won't work because the
img_objectdesign widget isn't parented in any other widget.

Take a look at http://www.gtk.org/tutorial/c39.html#SEC-HELLOWORLD it
isn't Visual C++ specific, but ought to ground you in the fundamentals.

Regards,

Peter Clifton





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