Figure 7.10c shows the contains of the exported file scope.bmp. Saving the scope display to a BMP file would
have been fairly simple if a handle to a deviceindependent bitmap existed. Simply write BITMAPINFOHEADER information followed by the contents of the bitmap. The three fields that have to be set in the BITMAPINFOHEADER are
the bfType which should always be "BM", the bfSize which is the size of the bitmap including
the infoheader and the bfOffBits which is the offset to the bitmap bits from the start of the file.
But unfortunately the scope display is a devicedependent bitmap. Therefore a DIB (Device
Independent Bitmap) must first be created from it.