博客
关于我
MFC:把登录界面的用户信息传回主界面
阅读量:140 次
发布时间:2019-02-28

本文共 533 字,大约阅读时间需要 1 分钟。

首先,登陆界面肯定是写在主界面的初始化中的,登陆界面用模态对话框,这样具有阻塞功能,在登录框没有注销之前,是不会运行主界面其他程序的,当用户名和密码匹配时,销毁登录对话框

主界面OnInitDialog()函数

LOGIN dlg_login;    //建立登陆对话框对象	dlg_login.DoModal();usernameTrans = dlg_login.usernameTrans;//usernameTrans 是主界面类的一个属性,用于接收登录对话框传进来的dlg_login.usernameTrans;

登录界面传值操作

//判断账号密码是否一致							if (m_name == UserNameEN && m_pwd == UserPassEN)				{   					//MessageBox(_T("登录成功!", "提示"));					usernameTrans = m_name;				//usernameTrans 是登录对话框类的一个属性,当用户名密码匹配,把用户名赋值给这个属性					//myFontuserName = m_name;									CDialog::OnOK();//销毁登录框				}

转载地址:http://miyc.baihongyu.com/

你可能感兴趣的文章
no session found for current thread
查看>>
No static resource favicon.ico.
查看>>
no such file or directory AndroidManifest.xml
查看>>
No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android
查看>>
NO.23 ZenTaoPHP目录结构
查看>>
no1
查看>>
NO32 网络层次及OSI7层模型--TCP三次握手四次断开--子网划分
查看>>
NOAA(美国海洋和大气管理局)气象数据获取与POI点数据获取
查看>>
NoClassDefFoundError: org/springframework/boot/context/properties/ConfigurationBeanFactoryMetadata
查看>>
node
查看>>
node exporter完整版
查看>>
node HelloWorld入门篇
查看>>
Node JS: < 一> 初识Node JS
查看>>
Node JS: < 二> Node JS例子解析
查看>>
Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime(93)解决
查看>>
Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime(72)
查看>>
Node 裁切图片的方法
查看>>
node+express+mysql 实现登陆注册
查看>>
Node+Express连接mysql实现增删改查
查看>>
node, nvm, npm,pnpm,以前简单的前端环境为什么越来越复杂
查看>>