For WM_ERASEBKGND, wParam is the required dc. See http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx

Why do you think that calling SetBkColor() for WM_ERASEBKGND message is going to change the colour of the background? Have you read the article to which I provided a link in post #13?