明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 4690|回复: 10

请问BeginEditorCommand()这个函数是干什么用的?

[复制链接]
发表于 2003-3-11 13:20 | 显示全部楼层 |阅读模式
发表于 2003-3-11 15:24 | 显示全部楼层

聚點交回AUTOCAD.

聚點交回AUTOCAD.
 楼主| 发表于 2003-3-11 16:02 | 显示全部楼层

我是个初学者,能不能讲详细点呢?谢谢了

发表于 2003-3-12 17:46 | 显示全部楼层

回复:请问BeginEditorCommand()这个函数是干什么用的?

BeginEditorCommand -- 挂起对话框,等待用户输入
CompleteEditorCommand -- 重新调出对话框
CancelEditorCommand -- 不显示对话框并且关闭
 楼主| 发表于 2003-3-13 17:00 | 显示全部楼层

非常感谢

发表于 2003-3-15 00:20 | 显示全部楼层

Answer

CAcUiDialog类是从CAdUiBaseDialog类派生的类,是一个提供了只能在AutoCAD中才能起作用的一系列对话框尺寸变化和数据记忆的成员函数的通用类。可以用来代替CDialog建立模态和非模式对话框。
在该类中有几个成员函数
BeginEditorCommand()                表示交互式命令开始
CompleteEditorCommand()        表示交互式命令完成
CancelEditorCommand()        表示交互式命令取消
使用方法:
BeginEditorCommand();
        ads_point pt;
        if(acedGetPoint(NULL,"请拾取一个点",pt)==RTNORM)
        {
                CompleteEditorCommand();
        }else
        {
                CancelEditorCommand();
}
发表于 2003-4-16 13:28 | 显示全部楼层

为什么我用了,对话框不能隐藏!

void GRALIBMAIN::OnButtonInsert()
{
        // TODO: Add your control notification handler code here

        BeginEditorCommand();//Òþ²Ø¶Ô»°¿òº¯Êý
        ads_point basept;
        InsertDlg Indlg;

//        int nReturnValue = Indlg.DoModal();
        if (acedGetPoint(NULL, "\nPick a point: ", basept) == RTNORM)
        {
                CompleteEditorCommand();
//                m_strXPt.Format("%g", basept[X]);
//                m_strYPt.Format("%g", basept[Y]);
//                m_strZPt.Format("%g", basept[Z]);
       
        }
        else
        {
                CancelEditorCommand();
        }

}
发表于 2003-4-18 12:41 | 显示全部楼层

确保你的类基于CAcUiDialog

发表于 2003-4-18 13:00 | 显示全部楼层

对话框是基于CAcUiDialog类的压
class InsertDlg : public CAcUiDialog
发表于 2003-4-18 13:05 | 显示全部楼层

这个函数已经被我实践了千百遍(有点夸张),你再仔细检查一下,肯定是某些地方出问题了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-2 23:07 , Processed in 0.419150 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表