Added patch to send WM_PAINT event during dialog creation.