问题代码:      pMetaFileDC->SelectObject(newPen);
调式时,有个assertion,源是:
      { ASSERT(m_hDC == m_hAttribDC); // ASSERT a simple CDC object
           return (hObject != NULL) ? ::SelectObject(m_hDC, hObject) : NULL; }好办,加上:      pDoc->pMetaFileDC->SetAttribDC(pDoc->pMetaFileDC->GetSafeHdc());可是这个函数达不到预期效果,看看源代码:      void CMetaFileDC::SetAttribDC(HDC hDC)  // Set the Attribute DC
     {
              if (hDC != m_hDC)
                CDC::SetAttribDC(hDC);
            if (m_hDC == m_hAttribDC)   // if we somehow got to this, correct it
               ReleaseAttribDC();
      }晕,到底m_hDC和m_hAttribDC是应该相等还是不等呢?另外,如果直接用release编译,程序一点问题都没有。这是什么原因呢?