I always thought that once you called SetPanelPixmap() the panel would always show the image as a background, redrawing itself as necessary (like after another window moves across it, etc).
With the Linux GTK mod (it's nice when you have control over how things work!) I have the panel raising an ACTIVATE_REDRAW event when the system decides it needs redrawn (ie the panel has been invalidated in some way), which I catch and do two things. One, is to raise an EVENT_GADGETPAINT, and the other is to get the panel to redraw itself.
The GADGETPAINT event I found, was very useful if you (as the user) wanted some control over the pixmap.
I imagine the Win32/Mac GUI mods could do with something along these lines too, as it would most likely sort out the problems you've described.
I'm a firm believer of having as many EVENTs raised as possible, to allow the programmer lots of freedom to code.
With the Linux GTK mod (it's nice when you have control over how things work!) I have the panel raising an ACTIVATE_REDRAW event when the system decides it needs redrawn (ie the panel has been invalidated in some way), which I catch and do two things. One, is to raise an EVENT_GADGETPAINT, and the other is to get the panel to redraw itself.
The GADGETPAINT event I found, was very useful if you (as the user) wanted some control over the pixmap.
I imagine the Win32/Mac GUI mods could do with something along these lines too, as it would most likely sort out the problems you've described.
I'm a firm believer of having as many EVENTs raised as possible, to allow the programmer lots of freedom to code.