zdfwyh 发表于 2005-8-23 12:43:00

如何实现交互对话框(选择一个点)

我想建立一个对话框,上面有一个按钮,点击后隐藏对话框,从CAD中选取一点,然后显示对话框,和坐标.不知如何实现这个交互过程?请高手指点迷津.

yfy2003 发表于 2005-8-23 16:46:00

void AsdkAcUiDialogSample::OnButtonPoint()
{
    // Hide the dialog and give control to the editor
    BeginEditorCommand();
    ads_point pt;
    // Get a point
    if (acedGetPoint(NULL, "\nPick a point: ", pt) == RTNORM) {
      // If the point is good, continue
      CompleteEditorCommand();
      m_strXPt.Format("%g", pt);
      m_strYPt.Format("%g", pt);
      m_strZPt.Format("%g", pt);
      DisplayPoint();
    } else {
      // otherwise cancel the command (including the dialog)
      CancelEditorCommand();
    }
}
页: [1]
查看完整版本: 如何实现交互对话框(选择一个点)