564 lines
14 KiB
C++
564 lines
14 KiB
C++
// InsertBlockDlg.cpp : implementation file
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "resource.h"
|
|
#include "InsertBlockDlg.h"
|
|
#include "DbMultiViewInsert.h"
|
|
#include "rxregsvc.h"
|
|
#include "axlock.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CInsertBlockDlg dialog
|
|
|
|
IMPLEMENT_DYNAMIC(CInsertBlockDlg, CModelessDialog)
|
|
int CInsertBlockDlg::m_nInputMethod = 0;
|
|
// Zyu add on 100819,块的类型
|
|
int CInsertBlockDlg::m_iBlockType = 1;
|
|
|
|
CInsertBlockDlg::CInsertBlockDlg(AcDbEntity *pInsert, CWnd* pParent /*=NULL*/)
|
|
: CModelessDialog(CInsertBlockDlg::IDD, pParent), m_pInsert(pInsert)
|
|
{
|
|
//{{AFX_DATA_INIT(CInsertBlockDlg)
|
|
m_csRotation = _T("");
|
|
m_csScaleX = _T("");
|
|
m_csScaleY = _T("");
|
|
m_csScaleZ = _T("");
|
|
m_csSizeX = _T("");
|
|
m_csSizeY = _T("");
|
|
m_csSizeZ = _T("");
|
|
m_bEqualScale = FALSE;
|
|
m_bMultiView = FALSE;
|
|
//}}AFX_DATA_INIT
|
|
m_nOldSizeX=0.0;
|
|
m_nOldSizeY=0.0;
|
|
m_nOldSizeZ=0.0;
|
|
m_nOldScaleX=m_nOldScaleY=m_nOldScaleZ=1.0;
|
|
m_nInputMethod=1;
|
|
SetFromBlockInfo();
|
|
}
|
|
CInsertBlockDlg::CInsertBlockDlg(AcDbObjectId idInsert,CWnd* pParent /*=NULL*/)
|
|
: CModelessDialog(CInsertBlockDlg::IDD, pParent), m_pInsert(NULL),m_idInsert(idInsert)
|
|
{
|
|
//{{AFX_DATA_INIT(CInsertBlockDlg)
|
|
m_csRotation = _T("");
|
|
m_csScaleX = _T("");
|
|
m_csScaleY = _T("");
|
|
m_csScaleZ = _T("");
|
|
m_csSizeX = _T("");
|
|
m_csSizeY = _T("");
|
|
m_csSizeZ = _T("");
|
|
m_bEqualScale = FALSE;
|
|
m_bMultiView = FALSE;
|
|
//}}AFX_DATA_INIT
|
|
m_nOldSizeX=0.0;
|
|
m_nOldSizeY=0.0;
|
|
m_nOldSizeZ=0.0;
|
|
m_nOldScaleX=m_nOldScaleY=m_nOldScaleZ=1.0;
|
|
m_nInputMethod=1;
|
|
SetFromBlockInfo();
|
|
}
|
|
void CInsertBlockDlg::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CModelessDialog::DoDataExchange(pDX);
|
|
//{{AFX_DATA_MAP(CInsertBlockDlg)
|
|
DDX_Text(pDX, IDC_ROTATION, m_csRotation);
|
|
// Zyu modify on 100716,调整UI
|
|
// Begin
|
|
//DDX_Text(pDX, IDC_XSCALE, m_csScaleX);
|
|
//DDX_Text(pDX, IDC_YSCALE, m_csScaleY);
|
|
//DDX_Text(pDX, IDC_ZSCALE, m_csScaleZ);
|
|
//DDX_Text(pDX, IDC_SIZEX, m_csSizeX);
|
|
//DDX_Text(pDX, IDC_SIZEY, m_csSizeY);
|
|
//DDX_Text(pDX, IDC_SIZEZ, m_csSizeZ);
|
|
DDX_Check(pDX, IDC_EQUAL_SCALE, m_bEqualScale);
|
|
// Zyu add on 100819
|
|
if (m_bMultiView)
|
|
{
|
|
m_iBlockType = 1;
|
|
}
|
|
DDX_Radio(pDX, IDC_RAD_ACAD, m_iBlockType);
|
|
|
|
DDX_Radio(pDX, IDC_INPUT_SIZE, m_nInputMethod);
|
|
if (m_nInputMethod)
|
|
{
|
|
DDX_Text(pDX, IDC_SIZEX, m_csScaleX);
|
|
DDX_Text(pDX, IDC_SIZEY, m_csScaleY);
|
|
DDX_Text(pDX, IDC_SIZEZ, m_csScaleZ);
|
|
}
|
|
else
|
|
{
|
|
DDX_Text(pDX, IDC_SIZEX, m_csSizeX);
|
|
DDX_Text(pDX, IDC_SIZEY, m_csSizeY);
|
|
DDX_Text(pDX, IDC_SIZEZ, m_csSizeZ);
|
|
}
|
|
// End
|
|
//DDX_Check(pDX, IDC_MAKE_VIEW2D, m_bMultiView);
|
|
//}}AFX_DATA_MAP
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CInsertBlockDlg, CModelessDialog)
|
|
//{{AFX_MSG_MAP(CInsertBlockDlg)
|
|
ON_BN_CLICKED(IDC_INPUT_SIZE, OnInputSize)
|
|
ON_BN_CLICKED(IDC_INPUT_SCALE, OnInputScale)
|
|
// Zyu modify on 100716,调整UI
|
|
//ON_EN_KILLFOCUS(IDC_XSCALE, OnKillfocusScalex)
|
|
//ON_EN_KILLFOCUS(IDC_YSCALE, OnKillfocusScaley)
|
|
//ON_EN_KILLFOCUS(IDC_ZSCALE, OnKillfocusScalez)
|
|
ON_EN_KILLFOCUS(IDC_ROTATION, OnEnKillfocusRotation)
|
|
ON_EN_KILLFOCUS(IDC_SIZEX, OnKillfocusSizex)
|
|
ON_EN_KILLFOCUS(IDC_SIZEY, OnKillfocusSizey)
|
|
ON_EN_KILLFOCUS(IDC_SIZEZ, OnKillfocusSizez)
|
|
// sg add 110504,解决切换关键字时,图块类型不更新的问题
|
|
ON_BN_CLICKED(IDC_RAD_ACAD, OnRadioBlockType)
|
|
ON_BN_CLICKED(IDC_RAD_TG, OnRadioBlockType)
|
|
ON_WM_KILLFOCUS()
|
|
// Zyu delete on 100716,调整UI
|
|
//ON_BN_CLICKED(IDC_APPLY, OnApply)
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CInsertBlockDlg message handlers
|
|
void CInsertBlockDlg::UpdateScales()
|
|
{
|
|
// size -> scales;
|
|
//int luprec, auprec;
|
|
//VERIFY(xg_getvar("LUPREC", &luprec)==RTNORM;
|
|
XString luFormat;
|
|
luFormat << _T("%.4f");
|
|
if(fabs(m_nOldSizeX)>1.0E-3 && fabs(_tstof(m_csSizeX))>1.0E-3) {
|
|
double nScaleX=m_nOldScaleX * _tstof(m_csSizeX)/m_nOldSizeX;
|
|
m_csScaleX.Format(luFormat, nScaleX);
|
|
}
|
|
if(fabs(m_nOldSizeY)>1.0E-3 && fabs(_tstof(m_csSizeY))>1.0E-3) {
|
|
double nScaleY=m_nOldScaleY * _tstof(m_csSizeY)/m_nOldSizeY;
|
|
m_csScaleY.Format(luFormat, nScaleY);
|
|
}
|
|
if(fabs(m_nOldSizeZ)>1.0E-3 && fabs(_tstof(m_csSizeZ))>1.0E-3) {
|
|
double nScaleZ=m_nOldScaleZ * _tstof(m_csSizeZ)/m_nOldSizeZ;
|
|
m_csScaleZ.Format(luFormat, nScaleZ);
|
|
}
|
|
}
|
|
|
|
void CInsertBlockDlg::UpdateSizes()
|
|
{
|
|
int luprec;
|
|
VERIFY(xg_getvar(_T("LUPREC"), &luprec)==RTNORM);
|
|
XString luFormat;
|
|
luFormat << _T("%.") << luprec << _T("f");
|
|
if(fabs(m_nOldSizeX)>1.0E-3 && fabs(_tstof(m_csScaleX))>1.0E-3) {
|
|
double nSizeX=m_nOldSizeX * _tstof(m_csScaleX)/m_nOldScaleX;
|
|
m_csSizeX.Format(luFormat, nSizeX);
|
|
}
|
|
if(fabs(m_nOldSizeY)>1.0E-3 && fabs(_tstof(m_csScaleY))>1.0E-3) {
|
|
double nSizeY=m_nOldSizeY * _tstof(m_csScaleY)/m_nOldScaleY;
|
|
m_csSizeY.Format(luFormat, nSizeY);
|
|
}
|
|
if(fabs(m_nOldSizeZ)>1.0E-3 && fabs(_tstof(m_csScaleZ))>1.0E-3) {
|
|
double nSizeZ=m_nOldSizeZ * _tstof(m_csScaleZ)/m_nOldScaleZ;
|
|
m_csSizeZ.Format(luFormat, nSizeZ);
|
|
}
|
|
}
|
|
|
|
|
|
void CInsertBlockDlg::SetFromBlockInfo()
|
|
{
|
|
if(!m_idInsert.isNull())
|
|
{
|
|
m_pInsert=NULL;
|
|
acdbOpenObject(m_pInsert,m_idInsert,AcDb::kForRead);
|
|
if(m_pInsert!=NULL)
|
|
{
|
|
AcDbBlockReference *pBlockInsert=AcDbBlockReference::cast(m_pInsert);
|
|
BOOL bDelete=FALSE;
|
|
if(!pBlockInsert) {
|
|
TDbMultiViewInsert *pMview=TDbMultiViewInsert::cast(m_pInsert);
|
|
ASSERT(pMview);
|
|
if(!pMview)
|
|
return;
|
|
pBlockInsert=pMview->NewBlock(TRUE);
|
|
bDelete=TRUE;
|
|
}
|
|
AcDbBlockReference &entInsert=*pBlockInsert;
|
|
|
|
TBlockGeomInfo geom;
|
|
geom.SetFromInsert(&entInsert);
|
|
double nRotation = geom.m_nRotation*180.0/PI;
|
|
//m_nPointIndice = 0;
|
|
m_ptCen = geom.m_ptCen;
|
|
m_ptBase = entInsert.position();
|
|
m_nOldSizeX=geom.GetSizeX();
|
|
m_nOldSizeY=geom.GetSizeY();
|
|
m_nOldSizeZ=geom.GetSizeZ();
|
|
AcGeScale3d scales=entInsert.scaleFactors();
|
|
m_nOldScaleX=scales[0];
|
|
m_nOldScaleY=scales[1];
|
|
m_nOldScaleZ=scales[2];
|
|
|
|
int luprec, auprec;
|
|
VERIFY(xg_getvar(_T("LUPREC"), &luprec)==RTNORM &&
|
|
xg_getvar(_T("AUPREC"), &auprec)==RTNORM);
|
|
XString luFormat0, luFormat, auFormat;
|
|
luFormat0 << _T("%.") << luprec << _T("f");
|
|
luFormat << _T("%.4f");
|
|
auFormat << _T("%.") << auprec << _T("f");
|
|
|
|
m_csSizeX.Format(luFormat0, geom.m_nSizeX);
|
|
m_csSizeY.Format(luFormat0, geom.m_nSizeY);
|
|
m_csSizeZ.Format(luFormat0, geom.m_nSizeZ);
|
|
m_csRotation.Format(auFormat, nRotation);
|
|
|
|
m_csScaleX.Format(luFormat, m_nOldScaleX);
|
|
m_csScaleY.Format(luFormat, m_nOldScaleY);
|
|
m_csScaleZ.Format(luFormat, m_nOldScaleZ);
|
|
if(_tcscmp(m_csScaleX, m_csScaleY)==0 &&
|
|
_tcscmp(m_csScaleY, m_csScaleZ)==0)
|
|
m_bEqualScale=TRUE;
|
|
else
|
|
m_bEqualScale=FALSE;
|
|
|
|
if(bDelete)
|
|
delete pBlockInsert;
|
|
|
|
m_pInsert->close();
|
|
m_pInsert=NULL;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
AcDbBlockReference *pBlockInsert=AcDbBlockReference::cast(m_pInsert);
|
|
BOOL bDelete=FALSE;
|
|
if(!pBlockInsert) {
|
|
TDbMultiViewInsert *pMview=TDbMultiViewInsert::cast(m_pInsert);
|
|
ASSERT(pMview);
|
|
if(!pMview)
|
|
return;
|
|
pBlockInsert=pMview->NewBlock(TRUE);
|
|
bDelete=TRUE;
|
|
}
|
|
AcDbBlockReference &entInsert=*pBlockInsert;
|
|
|
|
TBlockGeomInfo geom;
|
|
geom.SetFromInsert(&entInsert);
|
|
double nRotation = geom.m_nRotation*180.0/PI;
|
|
//m_nPointIndice = 0;
|
|
m_ptCen = geom.m_ptCen;
|
|
m_ptBase = entInsert.position();
|
|
m_nOldSizeX=geom.GetSizeX();
|
|
m_nOldSizeY=geom.GetSizeY();
|
|
m_nOldSizeZ=geom.GetSizeZ();
|
|
AcGeScale3d scales=entInsert.scaleFactors();
|
|
m_nOldScaleX=scales[0];
|
|
m_nOldScaleY=scales[1];
|
|
m_nOldScaleZ=scales[2];
|
|
|
|
int luprec, auprec;
|
|
VERIFY(xg_getvar(_T("LUPREC"), &luprec)==RTNORM &&
|
|
xg_getvar(_T("AUPREC"), &auprec)==RTNORM);
|
|
XString luFormat0, luFormat, auFormat;
|
|
luFormat0 << _T("%.") << luprec << _T("f");
|
|
luFormat << _T("%.4f");
|
|
auFormat << _T("%.") << auprec << _T("f");
|
|
|
|
m_csSizeX.Format(luFormat0, geom.m_nSizeX);
|
|
m_csSizeY.Format(luFormat0, geom.m_nSizeY);
|
|
m_csSizeZ.Format(luFormat0, geom.m_nSizeZ);
|
|
m_csRotation.Format(auFormat, nRotation);
|
|
|
|
m_csScaleX.Format(luFormat, m_nOldScaleX);
|
|
m_csScaleY.Format(luFormat, m_nOldScaleY);
|
|
m_csScaleZ.Format(luFormat, m_nOldScaleZ);
|
|
if(_tcscmp(m_csScaleX, m_csScaleY)==0 &&
|
|
_tcscmp(m_csScaleY, m_csScaleZ)==0)
|
|
m_bEqualScale=TRUE;
|
|
else
|
|
m_bEqualScale=FALSE;
|
|
|
|
if(bDelete)
|
|
delete pBlockInsert;
|
|
}
|
|
}
|
|
|
|
// Zyu add on 100819,获得用户选择的图块类型0->ACAD图块,1->上华图块
|
|
int CInsertBlockDlg::GetBlockType()
|
|
{
|
|
UpdateData();
|
|
return m_iBlockType;
|
|
}
|
|
|
|
void CInsertBlockDlg::UpdateInsert()
|
|
{
|
|
if(m_pInsert!=NULL)
|
|
{
|
|
AcDbBlockReference *pBlockInsert=AcDbBlockReference::cast(m_pInsert);
|
|
AcGeScale3d scales;
|
|
scales[0]=_tstof(m_csScaleX);
|
|
scales[1]=_tstof(m_csScaleY);
|
|
scales[2]=_tstof(m_csScaleZ);
|
|
|
|
if(!pBlockInsert) {
|
|
TDbMultiViewInsert *pMview=TDbMultiViewInsert::cast(m_pInsert);
|
|
ASSERT(pMview);
|
|
if(!pMview)
|
|
return;
|
|
pMview->SetScaleFactors(scales);
|
|
pMview->SetRotation(_tstof(m_csRotation)*PI/180.0);
|
|
} else {
|
|
AcDbBlockReference &entInsert=*pBlockInsert;
|
|
entInsert.setScaleFactors(scales);
|
|
entInsert.setRotation(_tstof(m_csRotation)*PI/180.0);
|
|
}
|
|
}
|
|
}
|
|
|
|
BOOL CInsertBlockDlg::OnInitDialog()
|
|
{
|
|
CModelessDialog::OnInitDialog();
|
|
|
|
UpdateData(FALSE);
|
|
// Zyu delete on 100716,调整UI
|
|
/*
|
|
BOOL bTrue=m_nInputMethod==0;
|
|
GetDlgItem(IDC_SIZEX)->EnableWindow(bTrue);
|
|
GetDlgItem(IDC_SIZEY)->EnableWindow(bTrue);
|
|
GetDlgItem(IDC_SIZEZ)->EnableWindow(bTrue);
|
|
GetDlgItem(IDC_XSCALE)->EnableWindow(!bTrue);
|
|
GetDlgItem(IDC_YSCALE)->EnableWindow(!bTrue);
|
|
GetDlgItem(IDC_ZSCALE)->EnableWindow(!bTrue);
|
|
*/
|
|
// Zyu add on 100819,插入多视图块时,“ACAD”类型按钮不可用
|
|
GetDlgItem(IDC_RAD_ACAD)->EnableWindow(!m_bMultiView);
|
|
return TRUE; // return TRUE unless you set the focus to a control
|
|
// EXCEPTION: OCX Property Pages should return FALSE
|
|
}
|
|
|
|
void CInsertBlockDlg::OnInputSize()
|
|
{
|
|
// Zyu modify on 100716,调整UI
|
|
/*
|
|
UpdateData(TRUE);
|
|
GetDlgItem(IDC_SIZEX)->EnableWindow(TRUE);
|
|
GetDlgItem(IDC_SIZEY)->EnableWindow(TRUE);
|
|
GetDlgItem(IDC_SIZEZ)->EnableWindow(TRUE);
|
|
GetDlgItem(IDC_XSCALE)->EnableWindow(FALSE);
|
|
GetDlgItem(IDC_YSCALE)->EnableWindow(FALSE);
|
|
GetDlgItem(IDC_ZSCALE)->EnableWindow(FALSE);
|
|
*/
|
|
m_nInputMethod = 0;
|
|
UpdateData(FALSE);
|
|
}
|
|
|
|
void CInsertBlockDlg::OnInputScale()
|
|
{
|
|
// TODO: Add your control notification handler code here
|
|
// Zyu delete on 100716,调整UI
|
|
/*
|
|
UpdateData(TRUE);
|
|
GetDlgItem(IDC_SIZEX)->EnableWindow(FALSE);
|
|
GetDlgItem(IDC_SIZEY)->EnableWindow(FALSE);
|
|
GetDlgItem(IDC_SIZEZ)->EnableWindow(FALSE);
|
|
GetDlgItem(IDC_XSCALE)->EnableWindow(TRUE);
|
|
GetDlgItem(IDC_YSCALE)->EnableWindow(TRUE);
|
|
GetDlgItem(IDC_ZSCALE)->EnableWindow(TRUE);
|
|
*/
|
|
m_nInputMethod = 1;
|
|
UpdateData(FALSE);
|
|
}
|
|
|
|
// Zyu delete on 100716,调整UI
|
|
/*
|
|
void CInsertBlockDlg::OnKillfocusScalex()
|
|
{
|
|
// TODO: Add your control notification handler code here
|
|
if(m_nInputMethod==1) {
|
|
UpdateData(TRUE);
|
|
if(m_bEqualScale) {
|
|
m_csScaleY=m_csScaleZ=m_csScaleX;
|
|
}
|
|
UpdateSizes();
|
|
UpdateData(FALSE);
|
|
}
|
|
|
|
}
|
|
|
|
void CInsertBlockDlg::OnKillfocusScaley()
|
|
{
|
|
// TODO: Add your control notification handler code here
|
|
if(m_nInputMethod==1) {
|
|
UpdateData(TRUE);
|
|
if(m_bEqualScale) {
|
|
m_csScaleX=m_csScaleZ=m_csScaleY;
|
|
}
|
|
UpdateSizes();
|
|
UpdateData(FALSE);
|
|
}
|
|
|
|
}
|
|
|
|
void CInsertBlockDlg::OnKillfocusScalez()
|
|
{
|
|
// TODO: Add your control notification handler code here
|
|
if(m_nInputMethod==1) {
|
|
UpdateData(TRUE);
|
|
if(m_bEqualScale) {
|
|
m_csScaleX=m_csScaleY=m_csScaleZ;
|
|
}
|
|
UpdateSizes();
|
|
UpdateData(FALSE);
|
|
}
|
|
|
|
}
|
|
*/
|
|
|
|
// Zyu add on 100716
|
|
void CInsertBlockDlg::OnEnKillfocusRotation()
|
|
{
|
|
UpdateData(TRUE);
|
|
OnApply();
|
|
}
|
|
|
|
void CInsertBlockDlg::OnKillfocusSizex()
|
|
{
|
|
// TODO: Add your control notification handler code here
|
|
// Zyu modify on 100716
|
|
/*
|
|
if(m_nInputMethod==0) {
|
|
UpdateData(TRUE);
|
|
UpdateScales();
|
|
if(m_bEqualScale) {
|
|
m_csScaleY=m_csScaleZ=m_csScaleX;
|
|
UpdateSizes();
|
|
}
|
|
UpdateData(FALSE);
|
|
}
|
|
*/
|
|
UpdateData(TRUE);
|
|
if (1 == m_nInputMethod)
|
|
{
|
|
if(m_bEqualScale)
|
|
{
|
|
m_csScaleY = m_csScaleZ = m_csScaleX;
|
|
}
|
|
UpdateSizes();
|
|
}
|
|
else
|
|
{
|
|
UpdateScales();
|
|
if(m_bEqualScale)
|
|
{
|
|
m_csScaleY = m_csScaleZ = m_csScaleX;
|
|
UpdateSizes();
|
|
}
|
|
}
|
|
UpdateData(FALSE);
|
|
OnApply();
|
|
}
|
|
|
|
void CInsertBlockDlg::OnKillfocusSizey()
|
|
{
|
|
// TODO: Add your control notification handler code here
|
|
// Zyu modify on 100716
|
|
/*
|
|
if(m_nInputMethod==0) {
|
|
UpdateData(TRUE);
|
|
UpdateScales();
|
|
if(m_bEqualScale) {
|
|
m_csScaleZ=m_csScaleX=m_csScaleY;
|
|
UpdateSizes();
|
|
}
|
|
UpdateData(FALSE);
|
|
}
|
|
*/
|
|
UpdateData(TRUE);
|
|
if (1 == m_nInputMethod)
|
|
{
|
|
if(m_bEqualScale)
|
|
{
|
|
m_csScaleX = m_csScaleZ = m_csScaleY;
|
|
}
|
|
UpdateSizes();
|
|
}
|
|
else
|
|
{
|
|
UpdateScales();
|
|
if(m_bEqualScale)
|
|
{
|
|
m_csScaleX = m_csScaleZ = m_csScaleY;
|
|
UpdateSizes();
|
|
}
|
|
}
|
|
UpdateData(FALSE);
|
|
OnApply();
|
|
}
|
|
|
|
void CInsertBlockDlg::OnKillfocusSizez()
|
|
{
|
|
// TODO: Add your control notification handler code here
|
|
// Zyu modify on 100716
|
|
/*
|
|
if(m_nInputMethod==0) {
|
|
UpdateData(TRUE);
|
|
UpdateScales();
|
|
if(m_bEqualScale) {
|
|
m_csScaleX=m_csScaleY=m_csScaleZ;
|
|
UpdateSizes();
|
|
}
|
|
UpdateData(FALSE);
|
|
}
|
|
*/
|
|
UpdateData(TRUE);
|
|
if (1 == m_nInputMethod)
|
|
{
|
|
if(m_bEqualScale)
|
|
{
|
|
m_csScaleX = m_csScaleY = m_csScaleZ;
|
|
}
|
|
UpdateSizes();
|
|
}
|
|
else
|
|
{
|
|
UpdateScales();
|
|
if(m_bEqualScale)
|
|
{
|
|
m_csScaleX = m_csScaleY = m_csScaleZ;
|
|
UpdateSizes();
|
|
}
|
|
}
|
|
UpdateData(FALSE);
|
|
OnApply();
|
|
}
|
|
|
|
|
|
|
|
void CInsertBlockDlg::OnKillFocus(CWnd* pNewWnd)
|
|
{
|
|
CModelessDialog::OnKillFocus(pNewWnd);
|
|
UpdateData(TRUE);
|
|
if(m_idInsert.isNull())
|
|
UpdateInsert();
|
|
}
|
|
|
|
Adesk::Boolean acedPostCommand(const TCHAR * );
|
|
void CInsertBlockDlg::OnApply()
|
|
{
|
|
UpdateData(TRUE);
|
|
if(m_idInsert.isNull())
|
|
UpdateInsert();
|
|
else
|
|
acedPostCommand(_T("~\n"));
|
|
}
|
|
|
|
// sg add 110504,解决切换关键字时,图块类型不更新的问题
|
|
void CInsertBlockDlg::OnRadioBlockType()
|
|
{
|
|
UpdateData(TRUE);
|
|
}
|