Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
UND_Copy.cpp
Package: 44757463.rar [view]
Upload User: lj3531212
Upload Date: 2007-06-18
Package Size: 346k
Code Size: 2k
Category:
Graph Drawing
Development Platform:
Visual C++
- // UND_Copy.cpp: implementation of the CUND_Copy class.
- //
- //////////////////////////////////////////////////////////////////////
- #include "stdafx.h"
- #include "graphsoft.h"
- #include "UND_Copy.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_Copy::CUND_Copy()
- {
- CString str;
- str.LoadString(IDS_COPY);
- SetTitle(str);
- m_pSCopy=NULL;
- }
- CUND_Copy::CUND_Copy(void* pVoid)
- {
- m_pSCopy=NULL;
- m_pSCopy=(SUNDCopy*)pVoid;
- CString str;
- str.LoadString(IDS_COPY);
- SetTitle(str);
- }
- CUND_Copy::~CUND_Copy()
- {
- if(m_pSCopy!=NULL){
- for (int ii = 0; ii < m_pSCopy->ArrShape.GetSize(); ii++)
- delete m_pSCopy->ArrShape[ii];
- m_pSCopy->ArrShape.RemoveAll();
- delete m_pSCopy;
- m_pSCopy=NULL;
- }
- }
- void CUND_Copy::Destroy()
- {
- }
- BOOL CUND_Copy::OnEditUndo(CCore *pCore)
- {
- int nShapeNum=m_pSCopy->ArrShape.GetSize();
- CShape* pShape;
- CDC* pDC=CDC::FromHandle(GetDC(pCore->m_pView->GetSafeHwnd()));
- for(int i=0;i<nShapeNum;i++){
- pShape=m_pSCopy->ArrShape.GetAt(i);
- pCore->DrawGraph(pShape,FALSE);
- pCore->ReMoveShape(pShape->GetID());
- }
- return TRUE;
- }
- BOOL CUND_Copy::OnEditRedo(CCore *pCore)
- {
- int nShapeNum=m_pSCopy->ArrShape.GetSize();
- CShape* pShape;
- CDC* pDC=CDC::FromHandle(GetDC(pCore->m_pView->GetSafeHwnd()));
- for(int i=0;i<nShapeNum;i++){
- pShape=m_pSCopy->ArrShape.GetAt(i);
- pCore->DrawGraph(pShape,TRUE);
- pCore->m_pDoc->m_shapeList.AddTail(pShape);
- }
- return TRUE;
- }
- BOOL CUND_Copy::OutputLog(CCore *pCore)
- {
- //未做
- return false;
- }