 GetObjectAPI picThis.handle, Len(tBMP), tBMP
   If (Create(tBMP.bmWidth, tBMP.bmHeight)) Then
      lhDCDesktop = CreateDCAsNull("DISPLAY", ByVal 0&amp;, ByVal 0&amp;, ByVal 0&amp;)
      If (lhDCDesktop &lt;&gt; 0) Then
         lHDC = CreateCompatibleDC(lhDCDesktop)
         DeleteDC lhDCDesktop
         If (lHDC &lt;&gt; 0) Then
            ' Select the bitmap into the compatible DC:
            lhBmpOld = SelectObject(lHDC, picThis.handle)
            ' Get the DIB Color Table (according to the docs, G