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.
Printable View
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.
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.
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.