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