Display waveform in window

This is a discussion on Display waveform in window within the Windows Programming forums, part of the Platform Specific Boards category; Dear All, I have some date get from parallel port, how can i use these data to plot waveform at ...

  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    38

    Display waveform in window

    Dear All,
    I have some date get from parallel port, how can i use these data to plot waveform at real time using Visual c++?
    Thank you.

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    You will need to scale your data to fit the area you want, then you could use SetPixel() to plot the points, or MoveToEx() and LineTo() to connect points with lines. Many possibilities.

    You will nee to learn how to use a back buffer and blitting if you need the data to stay on the screen after, for example, minimising/maximising since Windows will not do that for you.

    If you don't know how to do that, ask.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,855
    Polyline() may also help.
    It draws an array of POINT structs.

    As Adrian said it is a matter of scaling the range in your data to the area of display on the screen.

    ScrollDC() may also be useful to make the graph move across the screen.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Just starting Windows Programming, School me!
    By Shamino in forum Windows Programming
    Replies: 17
    Last Post: 02-22-2008, 07:14 AM
  2. Adding buttons, edit boxes, etc to the window
    By rainmanddw in forum Windows Programming
    Replies: 1
    Last Post: 04-10-2006, 03:07 PM
  3. Window scrollbar
    By maxorator in forum Windows Programming
    Replies: 2
    Last Post: 10-07-2005, 12:31 PM
  4. opening seperate window to display bitmaps
    By Isometric in forum Windows Programming
    Replies: 24
    Last Post: 11-12-2003, 02:48 AM
  5. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM

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