我在dialog下面添加了一个edit control控件,属性显示该控件的id为:IDC_EDIT2可是我们获取此控件中输入的值啊,我想用IDC_EDIT2.GetWindowText(strTemp);
编译时报错1>e:\project\tyms\tyms\adduser.cpp(47) : error C2228: left of '.GetWindowTextW' must have class/struct/union, 请各位大虾指点一下。
编译时报错1>e:\project\tyms\tyms\adduser.cpp(47) : error C2228: left of '.GetWindowTextW' must have class/struct/union, 请各位大虾指点一下。
GetDlgItem(IDC_EDIT2)->GetWindowText(strTemp);或者为你的EDIT2关联control变量
CString strTemp;
GetDlgItemText(IDC_EDIT2,strTemp);