如何在vc ++ MFC中将默认值设置为编辑控制框? [英] how to set default values to the edit control box in vc++ MFC?

查看:629
本文介绍了如何在vc ++ MFC中将默认值设置为编辑控制框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在vc ++ MFC中为编辑控制框设置默认值?(不使用遮罩编辑控件)

how to set default values to the edit control box in vc++ MFC?(without using mask edit control)

推荐答案

上面给出的答案是好的,但是如果您想使用编辑控件中的值,还是需要从编辑控件中获取已编辑的值.最好使用类向导为该编辑控件添加一个变量.通过使用此变量,您可以使用UpdataData()函数调用获取和设置编辑控件的值.
The answer given above is good, but if you want to use the value from edit control or you need to get the edited value from the edit control. It is better to add a variable for that edit control using class wizard. And by using this variable you can Get and Set the value of edit control using UpdataData() function call.


您可以使用SetWindowText().将SetWindowText()放在OnInitDialog()中.

谢谢
You can use SetWindowText(). Place the SetWindowText() in OnInitDialog().

Thanks,


这篇关于如何在vc ++ MFC中将默认值设置为编辑控制框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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