新手入门教程 发表于 2026-1-26 16:01:13

三段封装好的显示文本函数拿去用

三段封装好的显示文本函数拿去用


//| CreateTextLable() function


void CreateTextLable


(string TextLableName, string Text, int TextSize, string FontName, color TextColor, int TextCorner, int X, int Y )


{


//---


   ObjectCreate(TextLableName, OBJ_LABEL, 0, 0, 0);


   ObjectSet(TextLableName, OBJPROP_CORNER, TextCorner);


   ObjectSet(TextLableName, OBJPROP_XDISTANCE, X);


   ObjectSet(TextLableName, OBJPROP_YDISTANCE, Y);


   ObjectSetText(TextLableName,Text,TextSize,FontName,TextColor);


//----


}






//| SetTextLable() function                                          |






void SetTextLable


(string TextLableName, string Text, int TextSize, string FontName, color TextColor, int TextCorner, int X, int Y )


{


//---


   ObjectSet(TextLableName, OBJPROP_CORNER, TextCorner);


   ObjectSet(TextLableName, OBJPROP_XDISTANCE, X);


   ObjectSet(TextLableName, OBJPROP_YDISTANCE, Y);


   ObjectSetText(TextLableName,Text,TextSize,FontName,TextColor);


//----


}






//| TimeCount() function                                          |






void TimeCount


(string TextLableName, int StartNumber, int StopNumber, int Inerval, int TextSize, string FontName, color TextColor, int TextCorner, int X, int Y )


{


//---


   CreateTextLable(TextLableName,"-"+StartNumber+"-",TextSize,FontName,TextColor,TextCorner,X,Y);


   WindowRedraw();


   PlaySound("WAIT");


   for(int Count=StartNumber+1;Count<=StopNumber;Count++)


    {


   Sleep(Inerval);


   PlaySound("WAIT");


   SetTextLable(TextLableName,"-"+ Count+"-",TextSize,FontName,TextColor,TextCorner,X,Y);


   WindowRedraw();


    }


   Sleep(Inerval);


   ObjectDelete(TextLableName);


//----


}



大家在看了小编以上对"三段封装好的显示文本函数拿去用"的介绍后应该都清楚了吧,希望对大家做单有所帮助。如果大家还想要下载更多有关"三段封装好的显示文本函数拿去用"的相关EA源码,敬请关注汇探网下载。我们会持续更新交易系统,EA源码。
页: [1]
查看完整版本: 三段封装好的显示文本函数拿去用