Since your comment gave me carte blanche to suggest an alternative solution, here's what I would do:
- Stop using
DoubleBuffered
. It leads to lots of visual oddities in lots of controls. I personally avoid it like the plague. - Solve your flickering problem by adding the
WS_EX_COMPOSITED
extended window style to your control. This window style can be a bit of a performance drag and I'd recommend that you only add this during the sizing loop, which is when you need it. I describe how to do that in my answer here: TLabel and TGroupbox Captions Flicker on Resize.