找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
首页论坛EAHub 外汇论坛
查看: 25|回复: 0

三段封装好的显示文本函数拿去用——小名叫雷锋

[复制链接]

4万

主题

54

回帖

4万

积分

管理员

积分
45954
发表于 2026-8-27 23:14:00 | 显示全部楼层 |阅读模式
//| 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);


//----


  }复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|EAHub外汇论坛

GMT+8, 2026-10-9 22:42 , Processed in 0.102404 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表