#include Pixmap _XmdLoadBitmapIcon (Widget widget, unsigned char *bits, int width, int height) { Pixel fg, bg; XtVaGetValues (widget, XmNforeground, &fg, XmNbackground, &bg, NULL); return XCreatePixmapFromBitmapData ( XtDisplay (widget), RootWindowOfScreen(XtScreen(widget)), (char *)(bits), width, height, fg, bg, DefaultDepthOfScreen(XtScreen(widget))); }