I read about some issues with SetPixel on vista, im running 7, so maybe its fixed, i dunno
If theres a bug in my code please tell me how to fix it, and if it works on your computer and its a bug from windows, then.. i have a problem :P
I wouldn't call it "mystery solved" if the problem is still there.
Note that each scan line is aligned on a 4-byte boundary. If necessary, padding bytes are added at the end of each line, so you need to skip those.
Thanks, i read alot of stuff about SetPixel failing if windows aero is off, its not SetPixel, i tested some stuff with it and it worked fine,
The code has always worked for me on my old laptop, i guess it had the resolution so that the padding was 0..
But how do i make my code so that itll work with this boundary/padding?
Edit:
Fixed it!
Added this to the RGB functions: return Data[y*(X*3+((X*3)%4))+3*x+ ];
And Data is a bit bigger in size: BYTE* Data = newunsignedchar[Y*(X*3+((X*3)%4))];
Obviously (X*3)%4 is the padding..
It works perfect now, thanks again!