Gonzalo Garramuno schrieb:
>> Gonzalo Garramuno schrieb:
>>>>
>>>> window must be shown before setting the icon.
>>>
>>> Thanks, that prevents the crash but the icon is not shown in the window.
>>
>> Yes, to show the icon, it must be set, before the window is shown.
>>
>> Maybe this helps:
>>
>>> int main( int argc, char** argv )
>>> {
>>>      fltk::Window window( 120, 220 );
>>>      Pixmap p, mask;
>>
>> fl_open_display();
>>
>>>      if ( XpmCreatePixmapFromData(fltk::xdisplay,
>>>                             DefaultRootWindow(fltk::xdisplay),
>>>                             viewer_xpm,
>>>                             &p,&mask, NULL) == XpmSuccess )

window.icon((char*) p);
 >>>      window.show();


> Thanks, but the icon is still not shown under Kubuntu.

You must set icon before calling window.show().

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to