// PRetangle.cpp : implementation file // #include "stdafx.h" #include "test.h" #include "PRetangle.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CPRetangle CPRetangle::CPRetangle(CPoint a ,CPoint b) { x = a; y = b; } CPRetangle::~CPRetangle() { } BEGIN_MESSAGE_MAP(CPRetangle, CEdit) //{{AFX_MSG_MAP(CPRetangle) // NOTE - the ClassWizard will add and remove mapping macros here. //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CPRetangle message handlers void CPRetangle::Serialize(CArchive& ar) { if (ar.IsStoring()) { // storing code ar << x.x << x.y << y.x << y.y; } else { // loading code ar >> x.x >> x.y >> y.x >> y.y; } }