2.3.1.1 TBCBitmap

Referenced by: TBCBSpecific

Specifies a bitmap used to store a custom icon used by a toolbar control.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

cbDIB

biHeader (30 bytes)

...

...

...

colors (variable)

...

bitmapData (variable)

...

cbDIB (4 bytes): Signed integer that specifies the count of total bytes, excluding this field, in the TBCBitmap structure plus 10. The value is given by the following formula:

 cbDIB = sizeOf(biHeader) + sizeOf(colors) + sizeOf(bitmapData) + 10

The value MUST be greater than or equal to 40, and MUST be less than or equal to 65576 (which is a bitmap that is 128 pixels high, 128 pixels wide at 32 bits of color per pixel plus 40 ((128 * 128 * 32 / 8) + 40)).

biHeader (30 bytes): A BITMAPINFOHEADER structure (section 2.3.1.2) that contains information about this bitmap.

colors (variable): Zero-based array of RGBQuad structures (section 2.3.1.3). MUST exist only if biHeader.biBitCount is less than or equal to 0x08. The number of elements in this array MUST be equal to 2^biHeader.biBitCount.

bitmapData (variable): An array of bytes as specified by the aData field of a DeviceIndependentBitmap object specified in [MS-WMF] section 2.2.2.9. The number of bytes in this array MUST be equal to cbDIB – sizeOf(colors) – sizeOf(biHeader) -10. The number of bytes in this array is also calculated with the following formula:

 Number of bytes in bitmapData = ((biHeader.biWidth * biHeader.biBitCount + 31) & ~31) / 8 * biHeader.biHeight