INF: BITMAPCOREINFO Reference Manual Vol 2 Documentation Error

ID Number: Q68876

3.00

WINDOWS

docerr

Summary:

Page 7-8 of the "Microsoft Windows Software Development Kit Reference

Volume 2" documents the BITMAPCOREINFO structure incorrectly. It is

documented as follows:

typedef struct _BITMAPCOREINFO {

BITMAPCOREHEADER bmciHeader;

RGBTRIPLE bmciColors[];

} BITMAPCOREINFO;

The following is the correct documentation:

typedef struct tagBITMAPCOREINFO {

BITMAPCOREHEADER bmciHeader;

RGBTRIPLE bmciColors[1];

} BITMAPCOREINFO;

More Information:

The BITMAPCOREINFO structure is used with device-independent bitmaps

(DIBs). The bmciColors array is a variable length array, the length of

which is determined by the number of bits used to represent each

pixel. The number of bits per pixel is specified by the value in the

bcBitCount field multiplied by the value in the biPlanes field of the

BITMAPCOREHEADER structure. The valid values for the bcBitCount field

are 1, 4, 8, or 24 bits per pixel and the valid value of the bcPlanes

field is 1. The following table summarizes the number of entries in

the bmciColors array for each valid bmciHeader.bcBitCount value:

Entries in

bmciHeader.bcBitCount bmciHeader.bcPlanes bmciColors Array

--------------------- --------------------- ----------------

1 (monochrome) 1 2 entries

4 1 16 entries

8 1 256 entries

24 (RGB triple) 1 No entries

For more information on this topic, see the sample program named

SHOWDIB included with the Windows Software Development Kit (SDK). It

demonstrates how to load, manipulate, and display DIBs.