UND_Edit.cpp
资源名称:44757463.rar [点击查看]
上传用户:lj3531212
上传日期:2007-06-18
资源大小:346k
文件大小:2k
源码类别:
绘图程序
开发平台:
Visual C++
- // UND_Edit.cpp: implementation of the CUND_Edit class.
- //
- //////////////////////////////////////////////////////////////////////
- #include "stdafx.h"
- #include "graphsoft.h"
- #include "UND_Edit.h"
- #include "Core.h"
- #include "GraphDefines.h"
- #ifdef _DEBUG
- #undef THIS_FILE
- static char THIS_FILE[]=__FILE__;
- #define new DEBUG_NEW
- #endif
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- CUND_Edit::CUND_Edit()
- {
- CString str;
- str.LoadString(IDS_EDIT);
- SetTitle(str);
- m_pSEdit=NULL;
- }
- CUND_Edit::CUND_Edit(void* pVoid)
- {
- m_pSEdit=NULL;
- m_pSEdit=(SUNDEdit*)pVoid;
- CString str;
- str.LoadString(IDS_EDIT);
- SetTitle(str);
- }
- CUND_Edit::~CUND_Edit()
- {
- if(m_pSEdit!=NULL){
- delete m_pSEdit;
- m_pSEdit=NULL;
- }
- }
- //只有在最后的时候在调用到
- void CUND_Edit::Destroy()
- {
- }
- BOOL CUND_Edit::OnEditUndo(CCore *pCore)
- {
- CShape* pShape=pCore->GetShapeByID(m_pSEdit->nID);
- CDC* pDC=CDC::FromHandle(GetDC(pCore->m_pView->GetSafeHwnd()));
- pCore->DrawGraph(pShape,FALSE);
- pShape->SetPtData(m_pSEdit->ArrDataPrevX,m_pSEdit->ArrDataPrevY);
- pCore->DrawGraph(pShape,TRUE);
- return TRUE;
- }
- BOOL CUND_Edit::OnEditRedo(CCore *pCore)
- {
- CShape* pShape=pCore->GetShapeByID(m_pSEdit->nID);
- CDC* pDC=CDC::FromHandle(GetDC(pCore->m_pView->GetSafeHwnd()));
- pCore->DrawGraph(pShape,FALSE);
- int i = m_pSEdit->ArrDataCurX.GetSize();
- pShape->SetPtData(m_pSEdit->ArrDataCurX,m_pSEdit->ArrDataCurY);
- pCore->DrawGraph(pShape,TRUE);
- return TRUE;
- }
- BOOL CUND_Edit::OutputLog(CCore *pCore)
- {
- //未做
- return false;
- }