Hello, im trying to use SetPixel() to create a pixel on my dos console application.
I'm not sure how to use it.
SetPixel(hDC, 10,10, RGB(0,0,255));
It's compiling but it's giving me an error when i open it.
hDC is not initialized.
Thank you and i hope you can help me.
I'm actually not sure how to initialize it.
... in your console application? ... Have you read MSDN's page on SetPixel? Have you read MSDN's page on device contexts?
Well, i heard from another website that it's actually usable in a console application.
I guess ill stick with SetConsoleTextAttribute and make graphics out of colored "spaces".
Or do you know any other functions to do that?
It is useable, but you still have to GetDC(); to get a valid device context.