I have a CDialog based app and I am overriding the CDialog's OnSize,
OnPaint and OnEraseBkGnd handlers so that when the user re-sizes the
dialog box I reposition its controls and repaint them.

However if I re-size the dialog box by dragging one edge, its outer
frame, caption and menu bar are all re-drawn BEFORE any of my CDialog
handlers gets called. The dialog's controls also get redrawn in their
original positions (i.e. same client coords).

Only then does my CMYDialog::Onsize() handler get called, in which I
move the controls to their new positions.

So although the controls end up in their correct new positions, the
redraw which occurs BEFORE my handlers is causing an unpleasant
juddering effect.

Does anyone know what is doing this redrawing BEFORE my CDialog
OnSize, OnPaint and OnEraseBkGnd handlers get called, and how to
prevent it redrawing the dialog box's controls?