WINCC中怎么制作子画面?
1个回答
展开全部
与你分享我的方法在WINCC中创建全局C脚本函数实现POPUP弹出窗口方法:1、在全局脚本编辑器中编写C项目函数:voidOpenPopup(char*WindowName,char*CaptionText){#defineApcinBaseScreenName"inBaseScreenName"char*lpszBasePictureName;lpszBasePictureName=GetTagChar(ApcinBaseScreenName);SetVisible(lpszBasePictureName,"Popup",FALSE);SetLeft(lpszBasePictureName,"Popup",200);SetTop(lpszBasePictureName,"Popup",200);SetPictureName(lpszBasePictureName,"Popup",WindowName);SetPropChar(lpszBasePictureName,"Popup","CaptionText",CaptionText);SetVisible(lpszBasePictureName,"Popup",TRUE);}2、在你的画面在中放一个画面窗口取名为“Popup”尺寸大小随意;3、新建一个画面建立你的子窗口;4、回到原来画面在你要弹出子窗口的对象的单击事件中调用上面的函数:voidOpenPopup(char*WindowName,char*CaptionText),括号内参数:WindowName为你的子窗口名称,CaptionText为子窗口标题。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询