在Win32中以对话框形式保存数据 [英] Save Data in Dialog Form in Win32

查看:100
本文介绍了在Win32中以对话框形式保存数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在win32中有一个代码,包括一个要求UserName& 密码。

我使用此代码创建表单:

Hi,
I have one code in win32 include one dialog form that ask for "UserName" & "Password".
I using this code for create Form:

HWND hDlg = CreateDialogParamA(g_hInstance, MAKEINTRESOURCE(IDD_DIALOG1 ), hWnd, DialogFunc, 0);





每次用户想要登录时都必须写入用户名&安培;密码。

我想知道可能的更改代码,以便在UserName字段中保存登录UserName,并且每次都不需要用户添加吗?

问候,



Each time user want login must write Username & password.
I want know possible change code to save login UserName in "UserName" field and no need user add that every time?
Regards,

推荐答案

只需在用户按下OK时保存数据,并在下次显示对话框时将其恢复。您可以使用注册表,数据库或本地文件永久保存。
Just save the data somewhere when the user presses OK and restore it next time you show the dialog. You could use the registry, a database or local file for saving permanently.


这篇关于在Win32中以对话框形式保存数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆