ry DC:
         DeleteDC hdc
      End If
   Else
      
      ' Extract the AND (mask) part of the icon image:
      
      ' Create a monochrome DC:
      hdc = CreateCompatibleDC(0&amp;)
      If (hdc &lt;&gt; 0) Then
         ' Create a monochrome bitmap:
         hBmp = CreateCompatibleBitmap(hdc, m_tIDE(nIndex - 1).bWidth,
          m_tIDE(nIndex - 1).bHeight)
         If (hBmp &lt;&gt; 0) Then
            ' Select the mono-bitmap into the DC:
            hBmpOld = SelectObject(hdc, hBmp)
            