| what I do,
Use decw$examples:bitmap to create a 32x32 and a 17x17 bitmap for your icons.
$bitmap=="$decw$examples:bitmap"
$bitmap icon.bit 32x32
$bitmap sm_icon.bit 17x17
In your C file include the following:
#include "icon.bit"
#include "sm_icon.bit"
Widget toplevel_widget;
Display *disp;
Screen *scrn;
Drawable drwbl;
Pixmap ipix;
Pixmap spix;
Arg al[40];
int count;
toplevel_widget = XtInitialize (...
disp = XtDisplay (toplevel_widget);
scrn = XtScreen (toplevel_widget);
drwbl = RootWindowOfScreen (scrn);
ipix = XCreateBitmapFromData
(disp, drwbl, icon_bits, icon_width, icon_height);
spix = XCreateBitmapFromData
(disp, drwbl, sm_icon_bits, sm_icon_width, sm_icon_height);
count = 0;
XtSetArg (al[count], XtNiconPixmap, ipix); count++;
XtSetArg (al[count], XtNiconifyPixmap, spix); count++;
XtSetValues (toplevel_widget, al, count);
You can also do a large part of it with UIL but someone else can fill you in on
that.
Dick
|