I found the problem. My Background CBrush member was not correctly initalized.