0
votes

Looking for some code/project examples on how to draw a pulse waveform with certain width/frequency in a MFC control. Which control would be the best to use for this purpose?. I am very new to this. Have already done some online search and definitely can use some expert ideas. I am lost.

1
A picture control might seem like the natural choice, but those get implemented as a CStatic which resist being updated dynamically. I'd probably go for a custom class derived from CWnd.Mark Ransom

1 Answers

1
votes

The MFC CStatic class represents a picture control. You can derive a class from CStatic and paint whatever you like in its OnPaint member function. For examples search codeproject.com and codeguru.com for "CStatic", like this one:

http://www.codeguru.com/cpp/controls/controls/chartingandanaloguecontrols/article.php/c5219/Simple-Graph-Control.htm