Hi,
Is there something wrong with this patch, or something I should add to it? I've resent it a few times now and always slept through the cracks. It fixes the bug, and fixes the existing message sequence to match Windows. (the WM_QUERYNEWPALETTE is optional and only because Wine sends it, Windows only does that in 256-color mode, which is completely unrelated to this patch)
FWIW, the patch just adds checks for WS_CHILD, because apparently that's what Windows does, and that's what fixes the bug, too.