Hi there,
I have a form which has WS_EX_COMPOSITED style enabled and in the paint event I paint a background image using Graphics.DrawImage.
Several of my own custom Controls are present on this form (ImageButton class), which also in turn render themselves using Graphics.DrawImage calls.
This does not work on Windows XP if WS_EX_COMPOSITED is enabled. In this case, the controls are never rendered, even though the paint code for them executes with no errors. You simply see nothing other than the background image as drawn by the parent Form.
If I do not set the WS_EX_COMPOSITED styleon the Form, everything works fine, but then of course there is flickering, which otherwise is eliminated via the double-buffering adding with WS_EX_COMPOSITED, and therefore why I need to use it.
I've seen others complain about this, but found no workaround other than not using this windows style.
For now if I detect XP, I just don't set the style. But then there is flickering galore. I assume there is some other workaround?
I will generate a simplified test case later which demonstrates this problem, but in the meantime I was hoping somebody had a workaround other than simply avoiding this window style which clearly doesn't work right on XP with GDI+.