This has been languishing without comment for 4 weeks. Can I have a hint as to what might be wrong, please?
FWIW, I see two potential problems:
* the approach to formatting is not really an improvement since this adds another badly formatted line—I would appreciate what the preferred solution would be here, since the existing advice is vague if not contradictory;
* there is a concern that this is not the right place or the right way to trigger WM_PAINT. The tests do seem to clearly show that WM_PAINT is sent synchronously for dialogs, and that it is *not* sent synchronously for regular windows, nor is it sent when showing or focusing a window as the dialog initialization code does. I don't see anywhere else WM_PAINT can be sent, and if there's another function we could be calling instead of UpdateWindow(), I am not aware of a way to test that that it is more correct.