BITMAPINFO * pBmi = 0; pBmi = (BITMAPINFO*) new BYTE [ sizeof (BITMAPINFO) + (sizeof (RGBQUAD) * 8)) ];
Ah yes when you look at it that way... But to be honest this doesn't look much better to me than the malloc() way (that is not to say that this solution is not good, just that in these cases using new/delete over malloc/free doesn't seem as compelling any more).
cheers,
roel
