Pixel plotting
I have been learning the basics of windows programming for a while now and would now like to learn a bit about GDI, such as plotting pixels on screen. So can anyone please give me an idea on how to create a simple function that plots a pixel,
somthing like -
Pixel(x, y, color, hwnd);
This is probably overly simple, but it looks like a good way.
Thanks for your time.
Group Who
Sounds like you are looking for the SetPixel() function:
COLORREF SetPixel(
HDC hdc, // handle to DC
int X, // x-coordinate of pixel
int Y, // y-coordinate of pixel
COLORREF crColor // pixel color
);
Is that what you wanted?
--
Very simple ideas lie within the reach only of complex minds.
COLORREF SetPixel(
HDC hdc, // handle to DC
int X, // x-coordinate of pixel
int Y, // y-coordinate of pixel
COLORREF crColor // pixel color
);
Is that what you wanted?
--
Very simple ideas lie within the reach only of complex minds.
this is sort of a sub question... Is there a function for doing this in OpenGl? I tryed to use this with OpenGL but it just flickers
Ben Gosney.
Ben Gosney.
Please excuse my grammer, I'm from zomerzet
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement