On 24.02.2011, at 13:12, leowang wrote: > Dear All, > I have a class A which inherit from Window class, I override it's draw > function. And did nothing in this function. > > Void A::draw() > { > return; > } > > But I found that when I call show() or redraw() function, it can call draw > function and refresh the window to black. Why? I think it should not refresh, > because the draw has do nothing. > > Can anyone tell me what's the reason, and how to do nothing when call the > draw() function.
Doing nothing does not mean that the window will be transparent or white. Quite to the contrary. It means that whatever the OS or Window Manager does to the window will remain just as is. So if the window manager allocates some random memory to store the window content, than *not* drawing into the window will display random data, usually black. _______________________________________________ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk