Sounds to me that it accidentially works on Windows XP and does not work anymore on Windows 7.
So for me, your design seems to be broken. Do you react correctly to paint events for your window/control? Do you set the correct window styles, telling the system who's responsible for drawing? Do you handle the background paint event correctly?
Cheers
Uwe