#include "apdefap.h"
void Click(char* lpszPictureName, char* lpszObjectName )
{
#pragma option(mbcs)
BOOL bVisible;
long int x,y;
//SetPropChar("MainFrame.Pdl","SonWin","TagPrefix","CVManOp_JK1_1."); //Return-Type: BOOL
SetPictureName("MainFrame.Pdl","SonWin","AHU_B1_2_Supply.pdl");
x=GetLeft(lpszPictureName,"B2S"); //Return-Type: long int
x+=250;
y=GetTop(lpszPictureName,"B2S"); //Return-Type: long int
y+=30;
SetLeft("MainFrame.Pdl","SonWin",x); //Return-Type: BOOL
SetTop("MainFrame.Pdl","SonWin",y); //Return-Type: BOOL
bVisible=GetVisible("MainFrame.Pdl","SonWin"); //Return-Type: BOOL
bVisible=!bVisible;
SetVisible("MainFrame.Pdl","SonWin",bVisible); //Return-Type: BOOL
SetPropChar("MainFrame.Pdl","SonWin","CaptionText","AHU-B1-2送风机操作模式"); //Return-Type: BOOL
}
如上面内容,我知道是点击一个图标,弹出一个小的操作界面的意思,但是从X+=250开始后我就看不懂了语句含义了,麻烦高手帮忙翻译下从X+=250开始的语句的意思,接下来我用的上,谢啦!
最佳答案
1先取出点击图标的坐标X,Y,然后设定弹出窗口的坐标为X+250,Y+30.
2点击图标显示,再次点击不显示
3把弹出窗口的名字改为送风机操作模式
主要用于弹出窗口的位置跟随点击图标的位置,并显示与否及名称
提问者对于答案的评价:
非常感谢,都是大神。也谢谢其他俩位的回答
原创文章,作者:ximenziask,如若转载,请注明出处:https://www.zhaoplc.com/plc356127.html