ion :: CKDoc ()
{
} :: ~ CKDoc ()
{
} CKDoc :: OnNewDocument ()
{(! CDocument :: OnNewDocument ()) FALSE;
/ / TODO: add reinitialization code here
/ / (SDI documents will reuse this document) TRUE;
}
/ / CKDoc serializationCKDoc :: Serialize (CArchive & ar)
{(ar.IsStoring ())
{
/ / збереження << A; << B; << C; << D; << a; << b}
{
/ / завантаження >> A; >> B; >> C; >> D; >> a; >> b;}
}
/ / CKDoc diagnostics
# ifdef _DEBUGCKDoc :: AssertValid () const
{:: AssertValid ();
} CKDoc :: Dump (CDumpContext & dc) const
{:: Dump (dc);
}
# endif / / _DEBUG
/ / kView.cpp: implementation of the CKView class
# include «stdafx.h»
# include «k.h»
# include «math.h»
# include
# include «kDoc.h»
# include «kView.h»
# include «Const.h»
# include «Color.h»
# ifdef _DEBUG
# define new DEBUG_NEW
# undef THIS_FILEchar THIS_FILE []=__ FILE__;
# endif
/ / CKView_DYNCREATE (CKView, CView) _MESSAGE_MAP (CKView, CView)
/ / {{AFX_MSG_MAP (CKView) _COMMAND (ID_PARAMETRES_CONSTANTS, OnParametresConstants) _COMMAND (ID_PARAMETRES_COLOUR, OnParametresColour)
/ /}} AFX_MSG_MAP
/ / Standard printing commands_COMMAND (ID_FILE_PRINT, CView :: OnFilePrint) _COMMAND (ID_FILE_PRINT_DIRECT, CView :: OnFilePrint) _COMMAND (ID_FILE_PRINT_PREVIEW, CView :: OnFilePrintPreview) _MESSAGE_MAP () :: CKView ()
{
/ / TODO: add construction code here
} :: ~ CKView ()
{
} CKView :: PreCreateWindow (CREATESTRUCT & cs)
{/ / TODO: Modify the Window class or styles here by modifying
/ / the CREATESTRUCT csCView :: PreCreateWindow (cs);}
/ / CKView drawingCKView :: OnDraw (CDC * pDC)
{rect; * pDoc=GetDocument (); _VALID (pDoc); (& rect); pDC -> MoveTo (rect.right / 2,0); -> LineTo (rect.right / 2, rect.bottom);// Вісь oy
pDC -> TextOut (rect.right / 2 +10, rect.top, «y»);
pDC -> MoveTo (0, rect.bottom / 2); -> LineTo (rect.right, rect.bottom / 2);// Вісь ox
pDC -> TextOut (rect.right - 10, rect.bottom/2-20, «x»); -> TextOut (rect.right/2-10, rect.bottom / 2 +3, «0»);// Початок координат 0 -> MoveTo (rect.right / 2,0); -> LineTo (rect.right/2-5, rect.top +12);// Верхня ліва стрілка-> MoveTo (rect.right / 2,0); -> LineTo (rect.right / 2 +5, rect.top +12);//...