I was siting and waiting for replies on how to draw a line. But why sit and wait I'll just go looking on DirectX!
I was siting and waiting for replies on how to draw a line. But why sit and wait I'll just go looking on DirectX!
I forgot to say that good place for looking on DirectX is www.planet-source-code.com
You just now thought about searching for something? In your other post you claimed to have searched this board (which I know has previous posts on drawing lines, plotting pixels, etc.).Originally posted by Unregistered
I was siting and waiting for replies on how to draw a line. But why sit and wait I'll just go looking on DirectX!
With DirectX or Win32?
Win32 (Straight out of MSDN)
MoveToEx:
WINGDIAPI BOOL WINAPI MoveToEx(
HDC hdc,
int X,
int Y,
LPPOINT lpPoint
);
LineTo:
BOOL LineTo(
int x,
int y );
or alternatively...
BOOL LineTo(
POINT point );
Simply use MoveToEx to the initial point of the line and then use LineTo to draw the line to the endpoint.
"...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers