Stupid question about GetDIBits [resolved]
I'm sure a similar question has been asked, but I wasn't able to find the answer to it. I'm trying to write a function similar to BitBlt in vc++ and I need to perform some calculations on each pixel of the Source DC. I breifly thought of using SetPixel but then realized that using a Dib would definitly be much faster (you directly modify the pixels in an array).
Anyway, long story short, I'm new to c++. If a function is returning an array, how do I set up the buffer for that array? The size of the Dib may vary, therefore I need to dynamically create the array based on the dimensions of the image being modified.
Do I need to allocate the entire array before calling the function, or will the function reallocate my array so the data will fit? Should the array be two dimensions or one?
BTW, my native toungue in VB6.