在Visual C ++ 6.0 MFC中编辑/检索控件的属性 [英] Edit/Retrieve Control's Properties in visual c++ 6.0 mfc

查看:58
本文介绍了在Visual C ++ 6.0 MFC中编辑/检索控件的属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Visual c ++ 6.0 MFC中获取/设置从/到编辑框中的值",组合框",单选按钮"和"Button"的标题?
在此先感谢=)

How to Get/Set Value From/To Edit box, Combo box, Radio button, and Button''s caption in visual c++ 6.0 MFC ?

thanks in advance =)

推荐答案

请参阅



您可以使用

GetWindowText()
SetWindowText().

例如:
Hi,

you can use

GetWindowText()
SetWindowText().

example:
CString strValue;
GetDlgItem(IDC_EDIT1)->GetWindowText(strValue);

CString strValue = _T("Sample text");
GetDlgItem(IDC_EDIT1)->SetWindowText(strValue);



欢呼



Cheers


尝试这些如何..."视频 http://msdn.microsoft.com/en-us/vstudio/bb931339 [ ^ ]
Try these "How do I..." videoshttp://msdn.microsoft.com/en-us/vstudio/bb931339[^]


这篇关于在Visual C ++ 6.0 MFC中编辑/检索控件的属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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