point Point=PixelLine[PosY];
Color *color;
img->GetPixel(PosY,PosX,color);
COLORREF clr;
clr=color->ToCOLORREF();
::SetPixel(hdcDestination,Point.x,Point.y,clr);
the '::SetPixel' terminate the program: "Process returned -1073741819 (0xC0000005) execution time : 0.922 s
Press any key to continue."
what i'm doing wrong?
(i tested if is that the problem)
you have the right idea, you just do not understand pointers :)
try this:
Color color;
img->GetPixel(PosY,PosX,&color);
COLORREF clr =color.ToCOLORREF();
spoiler:
do you see what you did wrong?
the function does NOT get memory for the pointer... your code has a pointer but no object, and you try to dereference that pointer and it crashes. In my version, you have the object, pass its address (as a pointer), and its valid...