Ok, I have tested it on attached program. I have tried it both with themes enabled and disabled where possible and of course 64bit builds. I have used code from your post with one change - it seems the background painting bug is manifesting itself even on winXP 64bit, which are AFAIK based on Win. Server 2003, so i have changed it like so:
WindowsVersion <= wvServer2003
The results are:
Win XP SP3 32b - ok
Win XP 64b in VirtualBox - ok (after the mentioned change)
Win Vista Home Premium SP1 32b - ok
Win 7 Ultimate SP1 64b in VirtualBox - ok