Hi, I have encountered problem that fl_create_offscreen() fails on
certain platforms (win 7) under certain circumstances, eg when called
from menu. This problem appears only on some platforms - like win 7 (on
win XP it seems to work fine).

Under further investigation it looks like it is caused by the fact that
fl_gc is NULL (probably fl_gc is reset to 0 after menu window is closed
- maybe the callback is called AFTER the menu window destructuion?) at
that stage and CreateCompatibleBitmap() function (within
fl_create_offscreen()) does not have a valid DC reference. This means
that it is safe to call fl_create_ofscreen() only within draw() methods
when fl_gc is valid.

I have resolved (made work-around) the problem by postponing  the calls
to offscreen functions during redraw but in general I believe that it
should be possible to create/manipulate offscreens at any time.

Any thoughts from Win32 API gurus?
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to