Ask about drawing red point in display window.

This is a discussion on Ask about drawing red point in display window. within the Windows Programming forums, part of the Platform Specific Boards category; If I have these coordinates (51,74),(98,59),(74,36) I want to display window. In this window have a rectangle which size is ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    68

    Ask about drawing red point in display window.

    If I have these coordinates
    (51,74),(98,59),(74,36)

    I want to display window. In this window have a rectangle which size is 256x256 and have a black frame. I want to show red point at (51,74),(98,59),(74,36) and if I want to draw black line from (98,59) to (74,36). Do you know how to do that?

    Thank you for your reply.

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    Look up these functions for line drawing:

    MoveToEx( )
    LineTo( )

    For setting a specific pixel:

    SetPixel( ) or faster.. SetPixelV( )

    For filling a rect with a solid color:

    FillRect( )

    You can find the parameters and such to the above mentioned functions at

    msdn.microsoft.com

    Let me know if you have any troubles.
    "...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. Drawing problem
    By gavra in forum Game Programming
    Replies: 4
    Last Post: 06-03-2009, 10:19 PM
  2. C or C++
    By AcerN30 in forum Game Programming
    Replies: 41
    Last Post: 05-30-2008, 06:57 PM
  3. Just starting Windows Programming, School me!
    By Shamino in forum Windows Programming
    Replies: 17
    Last Post: 02-22-2008, 07:14 AM
  4. Why only 32x32? (OpenGL) [Please help]
    By Queatrix in forum Game Programming
    Replies: 2
    Last Post: 01-23-2006, 01:39 PM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21