Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / June 2006

Tip: Looking for answers? Try searching our database.

Drawing a Graph (value vs time)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RichMo - 31 May 2006 11:02 GMT
Hi,

I'm new to C++ and i can't seem to find a tutorial on the net for thi
one.

I have a dialog based MFC app running that reads sensors using a US
interface device.

At the moment the varying data just moves a progress bar up and down.
I'm looking for a way to display this sensor data as a graph on th
screen. There are variables in my program that chenge as the senso
reading changes, so all i need to do is plot this against time on
line graph.
Here is some pseudocode for an example;

prognameDlg::OnTimer()
{
sensor1 = readData();
plot x,sensor1;
x++;
}

Code like this would just plot points as it moved along the screen. I'
guessing this should be quite simple, but i dont even know where t
start.

I suppose i need some sort of control or frame for the graph. I als
need to know how to draw the lines in it and make it scroll or restar
from the beginning.

Please can someone let me know where to start, or post a link to
tutorial if you know of one.

Thanks,
RichM


Bruno van Dooren - 01 Jun 2006 17:08 GMT
> I'm new to C++ and i can't seem to find a tutorial on the net for this
> one.
[quoted text clipped - 26 lines]
> Please can someone let me know where to start, or post a link to a
> tutorial if you know of one.

Hi,

Maybe this can help you :
http://www.codeproject.com/miscctrl/ntgraph_activex.asp
create a buffer in which you store data as it is coming in, and then
update the graph accordingly.

if you are new to C++, then I can recommend www.codeproject.com
as a good place to search for tutorials and articles.

Signature

Kind regards,
   Bruno van Dooren
   bruno_nos_pam_van_dooren@hotmail.com
   Remove only "_nos_pam"


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.