【WINCC】按钮C一键修改变量

WINCC按钮一键切换变量

 1 #include "apdefap.h"
 2 void OnLButtonUp(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName, UINT nFlags, int x, int y)
 3 {
 4 
 5 BOOL a;
 6 a=GetTagBit("M705_1");    //Return-Type :short int 
 7 if (a==0)  
 8 {
 9 if(MessageBox(NULL,"是否需要打开_(阀V308)吗?","操作提示",MB_YESNO|MB_ICONQUESTION|MB_SETFOREGROUND|MB_SYSTEMMODAL) == 6)
10   { SetTagBit("M705_1",1);}
11 }
12 else
13 {
14 if(MessageBox(NULL,"是否需要关闭_(阀V308)吗?","操作提示",MB_YESNO|MB_ICONQUESTION|MB_SETFOREGROUND|MB_SYSTEMMODAL) == 6)
15   { SetTagBit("M705_1",0); }
16 }
17 }

猜你喜欢

转载自www.cnblogs.com/1500SCL/p/12345030.html