[每日一码] 设置 宋体
void createMyStyle(){
AcDbTextStyleTablePointer pStyle(curDoc()->database()->textStyleTableId(),OpenMode::kForWrite);
if (pStyle.openStatus()==Acad::eOk && !pStyle->has(采用T("MyStyle")))
{
AcDbTextStyleTableRecord *pStyleRcd=new AcDbTextStyleTableRecord;
pStyleRcd->setFont(采用T("宋体"),Adesk::kFalse,Adesk::kFalse,1,0);//******
pStyleRcd->setName(采用T("MyStyle"));
pStyle->add(pStyleRcd);
pStyleRcd->close();
}
pStyle->close();
}
页:
[1]