Thread: Why sit...

  1. #1
    Unregistered
    Guest

    Lightbulb Why sit...

    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!

  2. #2
    Unregistered
    Guest
    I forgot to say that good place for looking on DirectX is www.planet-source-code.com

  3. #3
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065

    Re: Why sit...

    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!
    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.).

  4. #4
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Printing Array help
    By saahmed in forum C Programming
    Replies: 18
    Last Post: 02-22-2006, 10:11 PM
  2. Revelations in the John
    By IfYouSaySo in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 03-18-2005, 12:58 AM
  3. Lets make our own verbal/written language (non-programming)!!!
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 03-07-2002, 05:04 PM