Wincc问题,鼠标移至(不是点击)控件处,弹出一个显示信息的窗口!

2024-11-19 05:34:20
推荐回答(1个)
回答(1):

#include "apdefap.h"
void MouseMove(char* lpszPictureName, char* lpszObjectName , short Button, short Shift, long x, long y)
{
long left,top,width,height;
left=GetPropWord(lpszPictureName,lpszObjectName,"Left");
top=GetPropWord(lpszPictureName,lpszObjectName,"Top");
width=GetPropWord(lpszPictureName,lpszObjectName,"Width");
height=GetPropWord(lpszPictureName,lpszObjectName,"Height");
//SetTagDWord("left",left);
//SetTagDWord("top",top);
//SetTagDWord("width",width);
//SetTagDWord("height",height);
//SetTagDWord("x_1",x);
//SetTagDWord("y_1",y);
if((x>0)&&(x0)&&(x{
SetTagPrefix(lpszPictureName,"YB", lpszObjectName);
SetPictureName(lpszPictureName,"YB","Meter_Set");
SetPropWord(lpszPictureName,"YB","Left",left+width);
SetPropWord(lpszPictureName,"YB","Top",top+height);
SetVisible(lpszPictureName,"YB",1);}
else SetVisible(lpszPictureName,"YB",0);
}