TA的每日心情![](source/plugin/dsu_paulsign/img/emot/kx.gif) | 开心 昨天 15:23 |
---|
签到天数: 69 天 [LV.6]常住居民II
管理员
- 积分
- 2704
|
问题描述:在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 0;
}
afx_msg LRESULT XXX_Main::EndEditor(WPARAM wparam, LPARAM lparam)
{
CompleteEditorCommand();
return 0;
}
复制代码
而子对话框调用
复制代码
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(1, 0, pt);
m_ptRef.set(pt[0], pt[1], pt[2]);
UpdateData(false);
}
复制代码 |
|