wincc C动作函数是这样的(下图所示),请详细解释哈具体作用!!!本人刚学wincc软件!!!
#include"apdefap.h"voidOnClick(char*lpszPictureName,char*lpszObjectName,char*lpszProp...
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName)
{
char coilNr[30];
#define GetObject GetObject
__object *pdl=NULL;
__object *pic=NULL;
__object *obj=NULL;
pdl = __object_create("PDLRuntime");
pic=pdl->GetPicture("");
obj=pic->GetObject("lstExitCoil");
if(obj->ListIndex!=-1)
{
strcpy(coilNr, obj->List(obj->ListIndex));
printf("%s \r\n", coilNr);
if(strlen(coilNr)>0)
{
readPrinterData(coilNr); // READ THE DATA OF THE SELECTED COIL AND WRITE IT INTO THE TAGS VISUALIZED ON THE PAGE
SetVisible(lpszPictureName,"btnConfirm",1); //Return-Type: BOOL
}
}
} 展开
void OnClick(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName)
{
char coilNr[30];
#define GetObject GetObject
__object *pdl=NULL;
__object *pic=NULL;
__object *obj=NULL;
pdl = __object_create("PDLRuntime");
pic=pdl->GetPicture("");
obj=pic->GetObject("lstExitCoil");
if(obj->ListIndex!=-1)
{
strcpy(coilNr, obj->List(obj->ListIndex));
printf("%s \r\n", coilNr);
if(strlen(coilNr)>0)
{
readPrinterData(coilNr); // READ THE DATA OF THE SELECTED COIL AND WRITE IT INTO THE TAGS VISUALIZED ON THE PAGE
SetVisible(lpszPictureName,"btnConfirm",1); //Return-Type: BOOL
}
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询