在CAcUiTabChildDialog中使用点取或者(拾取)时卡住的问题

问题描述:在Tab的对话框中,其子对话框CAcUiTabChildDialog中用点取或者(拾取)时卡住的问题

在子对话框中:

BeginEditorCommand();

CompleteEditorCommand();

解决方案:

此类问题需要在对话框CAcUiTabMainDialog中添加

#define MSG_BEGIN_EDITOR_CAL WM_USER+1
#define MSG_END_EDITOR_CAL WM_USER+2

ON_MESSAGE(MSG_BEGIN_EDITOR_CAL,BeginEditor)
ON_MESSAGE(MSG_END_EDITOR_CAL,EndEditor)

afx_msg LRESULT XXX_Main::BeginEditor(WPARAM wparam, LPARAM lparam)
{
BeginEditorCommand();
return ;
} afx_msg LRESULT XXX_Main::EndEditor(WPARAM wparam, LPARAM lparam)
{
CompleteEditorCommand();
return ;
}

而子对话框调用

void XXX_Sub::OnBnClickedButtonpoint()
{
// TODO: 在此添加控件通知处理程序代码
UpdateData(); GetParent()->SendMessage(MSG_BEGIN_EDITOR_CAL); //选择点
ads_point pt;
int retcode = acedGetPoint(NULL, _T("选取内部参考点:"), pt); GetParent()->SendMessage(MSG_END_EDITOR_CAL); if (retcode != RTNORM)
return; T_S_BASEFUN_AUTOCAD.PointTran(, , pt);
m_ptRef.set(pt[], pt[], pt[]);
UpdateData(false);
}
上一篇:CodeForces 660A Co-prime Array


下一篇:windows一键部署java项目