source: small2.zip
We added the class vec2
to
capture the mathematical properties of a 2D geometrical point and the
class point2
to capture the
graphics (display) properties of a point. We modified
ChildView
to test the graphics display.
ChildView.h
class CChildView : public CWnd { // Attributes public: point2 a, b, c; };
ChildView.cpp
CChildView::CChildView() { a.set(1.5,0.6); b.set(0.5,0.2); c.set(0.1,0.9); } void CChildView::OnPaint() { CPaintDC dc(this); // device context for painting // TODO: Add your message handler code here a.draw(dc); b.draw(dc); c.draw(dc); // Do not call CWnd::OnPaint() for painting messages }
Maintained by John Loomis, updated Wed Jan 24 14:48:45 2007