The Dimensions of a Bitmap

Two other functions connected with bitmaps are the source of some confusion. These are:

SetBitmapDimension (hBitmap, xDimension, yDimension) ;

and:

dwDimension = GetBitmapDimension (hBitmap) ;

The xDimension and yDimension values (encoded as the low and high words in the dwDimension value returned from GetBitmapDimension) are the width and height of the bitmap in units of 0.1 mm, which correspond to logical units in the MM_LOMETRIC mapping mode. GDI itself doesn't use these dimensions. They are part of neither the BITMAP structure nor the bitmap file format. However, two cooperating applications could use these dimensions to aid in the scaling of bitmaps that are exchanged through the clipboard or other means.