[Overview][Types][Procedures and functions][Variables][Index] | Reference for unit 'LCLIntf' (#lcl)

# CreateDIBSection

Creates a bitmap into which the application can write.

## Declaration

Source position: winapih.inc line 57

`function CreateDIBSection(`
`DC: HDC;`
`const BitmapInfo: tagBITMAPINFO;`
`Usage: UINT;`
`var Bits: Pointer;`
`SectionHandle: TLCLHandle;`
`Offset: DWORD`
`):HBITMAP;`

## Arguments

`DC` |  | The DC for the bitmap.
`BitmapInfo` |  | Contains all information about the bitmap, except the pixels.
`Usage` |  | The type of the bitmap colors, e.g. DIB_RGB_COLORS.
`Bits` |  | Pointer to the bitmap pixels.
`SectionHandle` |  | Zero or the Handle of a file-mapping object, from which the bitmap is initialized (needs CreateFileMapping).
`Offset` |  | The offset to the bitmap bits in the file-mapping object.

## Function result

The bitmap Handle, zero on failure.