|
-
May 24th, 1999, 03:02 PM
#1
Graphicly Impaired
This is really basic to some, but how do I get a program to draw a figure I have an equation for?
-
May 24th, 1999, 08:37 PM
#2
Re: Graphicly Impaired
Hook the OnDraw event and paint using a Device Context (DC)
-
May 25th, 1999, 06:08 AM
#3
Re: Graphicly Impaired
Hmmm... Do you think you could explain that a little simpler? I am quite new to C++ an am not quite sure what you just said! 
-
May 25th, 1999, 08:14 AM
#4
Re: Graphicly Impaired
What was stated has nothing to do with C++. It has everything to do with Windows programming. His advice can be used by C, C++, Visual Basic, etc. *Windows* programmers.
Basically, when you want to draw on a window, you need to get something called a "device context" or DC for the window. When you issue Windows functions that draw circles, arcs, bezier curves, lines, etc., you issue them to the DC. To get a device context for the window, calls such as GetDC() are used.
Regards,
Paul McKenzie
-
May 25th, 1999, 08:23 AM
#5
Re: Graphicly Impaired
In windows, when a control wants to display itself, it must "draw" what you will see. The standard controls do this for you (in the old days, you had to do all of your own drawing.) The control knows when to perform this drawing because it is sent a "draw" event from the operating system. To perform this drawing you need a GDI resource called a device context. To find out more, look up OnDraw and device context or DC in MSDN.
-
May 26th, 1999, 06:21 AM
#6
Re: Graphicly Impaired
Thanks very much, both of you, could either of you send me a sample of this, or direct me to one?
-
May 28th, 1999, 11:38 AM
#7
Re: Graphicly Impaired
One way would be to populate a MSGrid control with the x and y values then call the MSGraph control
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|