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++ / November 2005

Tip: Looking for answers? Try searching our database.

help abou drawing a signal wave

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bad_Kid - 30 Nov 2005 19:42 GMT
(c++) I have to present a wave which is stored in a file (int numbers, I
know sample's freq) on some kind of graph. I've never been using drawing in
c++.
Any suggestions, the easiest way to do that?

thanx...
Peter Oliphant - 30 Nov 2005 20:59 GMT
You need to draw your graph on some 'control', typically a form or a panel.
What you want to do is overload its Paint event handler and create your own.
Then grab the Graphics for the control, and use it to draw primitives:

control->Paint += gcnew PaintEventHandler( this,
&MyClass::Paint_Event_Handler ) ;
 :
void Paint_Event_Handler( Object^, PaintEventArgs^ e )
{
           Graphics^ graphics = e->Graphics ;

           graphics ->DrawRectangle(...) ;
           graphics ->Draw_Circle(...) ;
           etc.
}

One of the primitive methods you can draw with is called DrawCurve( ). This
draws graphs!

Now keep in mind that the Paint event only fires when the control needs to
be re-drawn. Thus, you might at times need to call control->Refresh to force
a Paint event and thereby call your customized Paint event handler to update
the graphics, especially if you make any changes to what is to be drawn.

[==P==]

> (c++) I have to present a wave which is stored in a file (int numbers, I
> know sample's freq) on some kind of graph. I've never been using drawing
[quoted text clipped - 3 lines]
>
> thanx...

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.