调用AutoCAD的内置对话框

如何将CAD的内置对话框(如style命令所用的文字样式对话框)作为当前对话框的子对话框调出?

常用的几个对话框对应的函数为:
1、尺寸标注样式编辑对话框:
int acedEditDimstyleInteractie(AcDbDatabase *,AcDbDimStyleTableRecord *,int);
2、多行文字编辑对话框:
int acedEditMTextInteractie(AcDbMText *);
3、公差编辑对话框:
void acedEditToleranceInteractie(AcDbFcf *);
4、CAD自己的文件对话框:
int acedGetFileD(const char *,const char *,const char *,int,struct resbuf *);
int acedGetFileNavDialog(const char *,const char *,const char *,const char *,int,struct resbuf**);
5、填充面板对话框:
extern bool acedHatchPalletteDialog(const char* Pattern, bool bAllowCustom, char*& result);
6、线形对话框:
bool acedLinetypeDialog(AcDbObjectId,bool,char * &,AcDbObjectId &);
7、线宽对话框:
bool acedLineWeightDialog(AcDb::LineWeight,bool,AcDb::LineWeight &);
8、打印样式对话框:
bool acedPlotstyleDialog(const char *,bool,char * &);
9、填充编辑对话框:
void hatchedit(long,int,bool,const AcDbObject *);
10、文字样式对话框:
void inokeTextStyleDialog(AcDbDatabase *,CString *);

这些函数大多不在文档中,可按两种方式使用:
1、将这些函数放在一个头文件中,使用时直接包含进来就可以了。
2、先用GetModuleHandle获取acad.exe的句柄,然后用GetProcAddress动态获取指定函数的入口地址,之后就可以直接调用了。

     使用前需要用AfxSetResourceHandle设置CAD资源,用完要回设。

 

——————————————————————————————————————————————————

 

公用库报表控件类: CReportRecordItemAcCmColor

CReportRecordItemAssocVariable

CReportRecordItemBlock

CReportRecordItemBool

CReportRecordItemCellAlignment

CReportRecordItemLinetype

CReportRecordItemLineWeight

CReportRecordItemNumber

CReportRecordItemPropertyString

CReportRecordItemSymbol

 

posted @ 2016-10-13 08:47  shankun  阅读(888)  评论(0编辑  收藏  举报