#include "stdafx.h" #include "SigmaView.h" #include "SectionDoc.h" #include "ActionSortItem.h" #include "ItemSelect.h" //order:0=最上显示 1=最下显示 2=上移一层 3=下移一层 extern "C" __declspec(dllexport) int DisplayOrder_Set(CSigmaView * pView, int order) { if (order < 0 || order >3) return -1; if (pView == NULL) return -1; if (pView->m_pDoc == NULL) return -1; CPositionList seletionSet; pView->m_pDoc->GetSelectionSet(seletionSet); CActionSortItem * pSortItem = 0; if (order >= 0 && order <= 3) { pSortItem = new CActionSortItem(pView->m_pDoc, ID_OBJECT_MOVETOFRONT, seletionSet, order); } if (pSortItem != 0) { pView->m_pDoc->SetActionItem(pSortItem); return 1; } return -1; }