If (hBmpOld &lt;&gt; 0) Then
               
               ' We need to create a BitmapInfo structure is a monochrome
               ' version of the one provided in the Icon.
               
               ' First, get a copy of the BitmapInfoHeader structure:
               CopyMemory tBMIMono.bmiHeader, m_tBits(nIndex - 1).bBits(0),
                Len(tBMIH)
               
               ' Find the Mask bits within the icon.  These directly follow the
                XOR bits
               ' so we fi