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!
Printable View
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.).Quote:
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.