- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
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;
- }