然后再对文字加以说明:
void wenzi(string name,string neirong,int x,int y,int daxiao,color yanse)
{
if(ObjectFind(name)<0)
{
ObjectCreate(name,OBJ_LABEL,0,0,0);
ObjectSetText(name,neirong,daxiao,"Cambria",yanse);
ObjectSet(name,OBJPROP_XDISTANCE,x);
ObjectSet(name,OBJPROP_YDISTANCE,y);
ObjectSet(name,OBJPROP_CORNER,0);
ObjectSet(name,OBJPROP_SELECTABLE,false);
ObjectSet(name,OBJPROP_SELECTED,false);
ObjectSet(name,OBJPROP_HIDDEN,true);
ObjectSet(name,OBJPROP_ZORDER,0);
}
else
{
ObjectSetText(name,neirong,daxiao,"Cambria",yanse);
ObjectSet(name,OBJPROP_SELECTED,false);
ObjectSet(name,OBJPROP_HIDDEN,true);
ObjectSet(name,OBJPROP_ZORDER,0);
WindowRedraw();
}
} |