SetBitmapDimensionEx

  BOOL SetBitmapDimensionEx(hBitmap, nWidth, nHeight, lpSize)    
  HBITMAP hBitmap; /* handle of bitmap */
  int nWidth; /* bitmap width in .01 MM units */
  int nHeight; /* bitmap height in .01 MM units */
  LPSIZE lpSize; /* address of structure for original dimensions */

The SetBitmapDimensionEx function assigns preferred dimensions to a bitmap. These dimensions can be used by applications; however, they are not used by Windows.

Parameters

hBitmap

Identifies the bitmap.

nWidth

Specifies the width of the bitmap (in 0.1-millimeter units).

nHeight

Specifies the height of the bitmap (in 0.1-millimeter units).

lpSize

Points to a SIZE structure which receives the previous dimensions of the bitmap. This pointer can be NULL. The SIZE structure has the following format:

typedef struct tagSIZE { /* siz */

LONG cx;

LONG cy;

} SIZE;

Return Value

The return value is TRUE if the function is successful. Otherwise, it is FALSE.

Comments

An application can retrieve the dimensions assigned to a bitmap with the SetBitmapDimensionsEx function by calling the GetBitmapDimensionEx function.

See Also

GetBitmapDimensionEx, SIZE