unsigned get_device_independent_bitmap_color_table(handle device,
                                                   unsigned index,
                                                   unsigned entries,
                                                   red_green_blue* colors)

This function obtains red, green, blue color values for a range of entries in the color table of the device independent bitmap section that is currently selected into a specified device context


handle device

The handle of a device context which has a device independent bitmap section selected into it.

unsigned index

The (0-based) index of the first color entry to be queried.

unsigned entries

The number of color entries to be queried.

red_green_blue* colors

A pointer to a buffer to hold the red, green, blue color entries. The buffer must be large enough to accommodate the number of entries specified by the previous parameter.



Zero The call was unsuccessful.
Other The number of entries placed in the specified buffer.


This function should be called to obtain the color table for device independent bitmap sections that use 1, 4 or 8 bits per pixel. The member bit_count of the associated bitmap_information structure specifies the number of bits per pixel. device independent bitmap sections with a bitcount value greater than 8 do not have a color table. Instead they have associated color masks. The function get_object may be called to obtain those color masks.