It is indeed really weird. It looks like CClientDC directly or indirectly causes window to redraw in turn causing constant flow of WM_PAINT messages. Even wierder, you can remove BitBlt from OnPaint and window will still redraw, providing your code is equivalent to mine. This is a toughest question I have ever encountered on many discussion forums. I have quickly tested your code on Vista and so far I did not find any answers. I am looking into it and when (if) I find and answer it will be a real satisfaction. Later, I am also going to test it on XP and Windows 7.
JohnCz MS C++ MVP