Message 1 of 1
How to get The cmdline "Command:" from the BUTTON in CAcUidialogBar dockbar?

Not applicable
03-31-2005
01:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
void pipedlgbar::OnButton1()
{
UpdateData(TRUE);
acedGetAcadFrame()->EnableWindow(TRUE);
acedGetAcadFrame()->SetFocus();
acDocManager->lockDocument( acDocManager->curDocument(), AcAp::kWrite, NULL, NULL,true) ;
ads_point pt1,pt2,pt11,pt21;
if ((ads_getpoint(NULL,"\nfirst:",pt1))!=RTNORM)
return;
if ((ads_getpoint(pt1,"\nsecond:",pt2))!=RTNORM)
return;
struct resbuf ucs1,ucs2;
ucs1.restype=RTSHORT;
ucs1.resval.rint=1,
ucs2.restype=RTSHORT;
ucs2.resval.rint=0,
ads_trans(pt1,&ucs1,&ucs2,0,pt11);
ads_trans(pt2,&ucs1,&ucs2,0,pt21);
struct resbuf *line;
line=ads_buildlist(
RTDXF0,"LINE",
10, pt11,
11, pt21,
8 , "mylayer",
0 );
if (line==NULL)
return;
ads_entmake(line);
acDocManager->unlockDocument( acDocManager->curDocument());
}
{
UpdateData(TRUE);
acedGetAcadFrame()->EnableWindow(TRUE);
acedGetAcadFrame()->SetFocus();
acDocManager->lockDocument( acDocManager->curDocument(), AcAp::kWrite, NULL, NULL,true) ;
ads_point pt1,pt2,pt11,pt21;
if ((ads_getpoint(NULL,"\nfirst:",pt1))!=RTNORM)
return;
if ((ads_getpoint(pt1,"\nsecond:",pt2))!=RTNORM)
return;
struct resbuf ucs1,ucs2;
ucs1.restype=RTSHORT;
ucs1.resval.rint=1,
ucs2.restype=RTSHORT;
ucs2.resval.rint=0,
ads_trans(pt1,&ucs1,&ucs2,0,pt11);
ads_trans(pt2,&ucs1,&ucs2,0,pt21);
struct resbuf *line;
line=ads_buildlist(
RTDXF0,"LINE",
10, pt11,
11, pt21,
8 , "mylayer",
0 );
if (line==NULL)
return;
ads_entmake(line);
acDocManager->unlockDocument( acDocManager->curDocument());
}