#include "stdafx.h" #include "SigmaDoc.h" #include "SigmaView.h" extern "C" __declspec(dllexport) int GeoSigma_Undo(CSigmaView * pView, HDC hdc) { if (pView == 0) return -1; if (pView->m_pDoc == 0) return -1; CDC * pDC = CDC::FromHandle(hdc); pView->SetScreenDC(pDC); return pView->m_pDoc->Undo(); } /** * ·µ»Ø²Ù×÷ÀàÐÍ **/ extern "C" __declspec(dllexport) int GeoSigma_Redo(CSigmaView * pView, HDC hdc) { if (pView == 0) return -1; if (pView->m_pDoc == 0) return -1; CDC * pDC = CDC::FromHandle(hdc); pView->SetScreenDC(pDC); return pView->m_pDoc->Redo(); } extern "C" __declspec(dllexport) int GeoSigma_CanUndo(CSigmaView * pView) { if (pView == 0) return -1; if (pView->m_pDoc == 0) return -1; if (pView->m_pDoc->CanUndo()) return 1; return -1; } extern "C" __declspec(dllexport) int GeoSigma_CanRedo(CSigmaView * pView) { if (pView == 0) return -1; if (pView->m_pDoc == 0) return -1; if (pView->m_pDoc->CanRedo()) return 1; return -1; }