typedef struct tagBITMAPINFO { // bmi
BITMAPINFOHEADER bmiHeader;
RGBQUAD bmiColors[1];
} BITMAPINFO;
When I try to initialize the bmiColors[1] parameter like so:
BITMAPINFO blah;
blah.bmiColors = pRGB; //pRGB is a pointer to a 256-element
//array of RGBQUADs
I get the following error:
"cannot convert from 'struct tagRGBQUAD *' to 'struct tagRGBQUAD [1]'"
I must be missing something really basic here. What's an RGBQUAD[1]?
What should I be feeding the bmiColors as an argument?
Any help appreciated.
Thanks.
Graham Pratt
(jpr...@po-box.mcgill.ca)
BITMAPINFO *bm;
bm = new char[ sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) *
cant_colors ];
RGBQUAD * ptr = bm->bmiColors[0];
ptr points to the first color in the palette entry
++ptr to the second
In article <38e15f4c...@news1.qc.sympatico.ca>,
Sent via Deja.com http://www.deja.com/
Before you buy.