UND_TopToBtm.cpp
资源名称:44757463.rar [点击查看]
上传用户:lj3531212
上传日期:2007-06-18
资源大小:346k
文件大小:2k
源码类别:
绘图程序
开发平台:
Visual C++
- // UND_TopToBtm.cpp: implementation of the CUND_TopToBtm class.
- //
- //////////////////////////////////////////////////////////////////////
- #include "stdafx.h"
- #include "graphsoft.h"
- #include "UND_TopToBtm.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_TopToBtm::CUND_TopToBtm()
- {
- CString str;
- str.LoadString(IDS_TOPTOBOTTOM);
- SetTitle(str);
- m_pSToptoBtm=NULL;
- }
- CUND_TopToBtm::CUND_TopToBtm(void* pVoid)
- {
- m_pSToptoBtm=NULL;
- m_pSToptoBtm=(SUNDLeftToRight*)pVoid;
- CString str;
- str.LoadString(IDS_TOPTOBOTTOM);
- SetTitle(str);
- }
- CUND_TopToBtm::~CUND_TopToBtm()
- {
- if(m_pSToptoBtm!=NULL)
- delete m_pSToptoBtm;
- m_pSToptoBtm=NULL;
- }
- void CUND_TopToBtm::Destroy()
- {
- }
- BOOL CUND_TopToBtm::OnEditUndo(CCore *pCore)
- {
- int nShapeNum=m_pSToptoBtm->ArrId.GetSize();
- CShape* pShape;
- CRect rtOut=m_pSToptoBtm->rtOut;
- CDC* pDC=CDC::FromHandle(GetDC(pCore->m_pView->GetSafeHwnd()));
- for(int i=0;i<nShapeNum;i++){
- pShape=pCore->GetShapeByID(m_pSToptoBtm->ArrId.GetAt(i));
- pCore->DrawGraph(pShape,FALSE);
- pShape->TopToBottom(pDC,rtOut);
- pCore->DrawGraph(pShape,TRUE);
- }
- return TRUE;
- }
- BOOL CUND_TopToBtm::OnEditRedo(CCore *pCore)
- {
- return this->OnEditUndo(pCore);
- }
- BOOL CUND_TopToBtm::OutputLog(CCore *pCore)
- {
- //未做
- return false;
- }