I tried to make the background color changeable and wanted to use fl_rgb_color() for choosing color and Fl::background() for setting color. But fl_rgb_color() provides a Fl_Color value and Fl::background() needs a RGB value, so I need to change Fl_Color to RGB.
Because it might be, that Fl_Color holds RGB values, I tried to check out the bytes and it seems to work this way: unsigned T= (unsigned) fl_rgb_color(uchar(1), uchar(2), uchar(3)); int T1= uchar(T); // 0 int T2= uchar(T >> 8); // 3 int T3= uchar(T >> 16); // 2 int T4= uchar(T >> 24); // 1 But this code sets background to black, regardless of choosen color: unsigned F= (unsigned) fl_show_colormap((Fl_Color) Old_Col); Fl::background(uchar(F >> 24), uchar(F >> 16), uchar(F >> 8) ); pWindow->redraw(); How to make it work? _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

