If it causes an assertion, the reason is clear. Apparently you're calling Invalidate for the CWindow-class. If this class's m_hWnd member is not a valid window, it will cause an assertion. The most common reason for this is that your CWindow class is not properly constructed, initialized and created. Perhaps you're calling Invalidate too early ? To avoid this, add a conditional sentence in front of your Invalidate call that will check if the window in question is valid. This way, Invalidate will only be called on valid windows and the assertion will never fire. Otherwise, ATL has nothing in special compared to MFC or Win32. The CWindow::Invalidate will call InvalidateRect Win32 function to do it's task. -Antti Keskinen ---------------------------------------------- "If we wrote a report stating we saw a jet fighter with a howitzer, who's going to believe us ?" -- R.A.F. pilot quote on seeing a Me 262 armed with a 50mm Mauser cannon.