几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   ObjectARX(C++) (http://www.dimcax.com/hust/forumdisplay.php?f=34)
-   -   【转帖】如何实现交互对话框(选择一个点) (http://www.dimcax.com/hust/showthread.php?t=7387)

yang686526 2009-04-17 08:50 PM

【转帖】如何实现交互对话框(选择一个点)
 
如何实现交互对话框(选择一个点)
如何实现交互对话框(选择一个点)
我想建立一个对话框,上面有一个按钮,点击后隐藏对话框,从cad中选取一点,然后显示对话框,和坐标.不知如何实现这个交互过程?请高手指点迷津.
只有想不到没有做不到
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[x]);
m_strypt.format("%g", pt[y]);
m_strzpt.format("%g", pt[z]);
displaypoint();
} else {
// otherwise cancel the command (including the dialog)
canceleditorcommand();
}
}
行在山水间...... 展示你无穷的活力!
游在三维世界......展示你无穷的智慧!


所有的时间均为北京时间。 现在的时间是 05:54 PM.