WINCC登录设计教程.pdf
《WINCC登录设计教程.pdf》由会员分享,可在线阅读,更多相关《WINCC登录设计教程.pdf(8页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。
1、建立用户建立用户内部变量的建立内部变量的建立全局脚本函数全局脚本函数 EnumUserEnumUser#pragma code(UseGen.DLL)#include usegenap.h#pragma code()CMN_ERROR err;CMN_ERROR Error;LPCMN_ERRORerror;DWORDcountname;char usedata;extern BOOL MyPWGENEnumUsersCallBack(LPWGEN_USERINFO lpUserInfo,PVOID lpUser);VOID EnumUser()if(PWGENConnect(,&err)PW
2、GENEnumUsers(&countname,MyPWGENEnumUsersCallBack,&usedata,error);SetTagSDWord(count,countname);/Return-Type:BOOLprintf(Count:%2drn,countname);elseprintf(PWGENConnect Error:%drn,err);全局脚本函数全局脚本函数 MyPWGENEnumUsersCallBackMyPWGENEnumUsersCallBack#pragma code(UseGen.DLL)#include usegenap.h#pragma code()
3、BOOLMyPWGENEnumUsersCallBack(LPWGEN_USERINFO lpUserInfo,PVOID lpUser)static int n=0;if(n=GetTagWord(count)n=1;elsen=n+1;switch(n)case 16:SetTagChar(username16,lpUserInfo-login);break;case 15:SetTagChar(username15,lpUserInfo-login);break;case 14:SetTagChar(username14,lpUserInfo-login);break;case 13:S
4、etTagChar(username13,lpUserInfo-login);break;case 12:SetTagChar(username12,lpUserInfo-login);break;case 11:SetTagChar(username11,lpUserInfo-login);break;case 10:SetTagChar(username10,lpUserInfo-login);break;case 9:SetTagChar(username9,lpUserInfo-login);break;case 8:SetTagChar(username8,lpUserInfo-lo
5、gin);break;case 7:SetTagChar(username7,lpUserInfo-login);break;case 6:SetTagChar(username6,lpUserInfo-login);break;case 5:SetTagChar(username5,lpUserInfo-login);break;case 4:SetTagChar(username4,lpUserInfo-login);break;case 3:SetTagChar(username3,lpUserInfo-login);break;case 2:SetTagChar(username2,l
6、pUserInfo-login);break;case 1:SetTagChar(username1,lpUserInfo-login);break;return TRUE;画面窗口属性设置画面窗口属性设置登录按钮脚本登录按钮脚本#include apdefap.hvoid OnClick(char*lpszPictureName,char*lpszObjectName,char*lpszPropertyName)#pragma code(useadmin.dll)#include PWRT_API.H#pragma code()SetPropChar(main.pdl,pic_denglu,
7、Captiontext,正在验证,请稍后.);if(PWRTSilentLogin(GetTagChar(usernamestr),GetTagChar(passwordstr)=TRUE)SetTagBit(Visible1,0);SetTagChar(passwordstr,);elseSetPropChar(main.pdl,pic_denglu,Captiontext,密码不正确,请重新输入);注销按钮脚本注销按钮脚本#include apdefap.hvoid OnLButtonDown(char*lpszPictureName,char*lpszObjectName,char*lp
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- WINCC 登录 设计 教程
限制150内