1. Yes 2. If I remember correctly (haven't done painting stuff for a while) the CPaintDC class prepares the window dc for painting (calling BeginPaint on creation and calls EndPaint when destroyed). So, I guess you should skip the GetDC and ReleaseDC calls alltogether and only use the CPaintDC (which, if I remember correctly has a HDC operator).