MFC里面的EDIT Control控件的用法是怎么样的,1.怎么样才能赋值给EDIT Control控件并在EDIT Control控件显示出来;2.怎么取得EDIT Control控件的值并传递给一个变量?希望各位大侠帮帮忙!
//获得EDIT
CEdit* pBoxOne;
pBoxOne = (CEdit*) GetDlgItem(IDC_EDIT1);
//付值
pBoxOne->SetWindowText( _T"FOO" );
//取值
CString str;
pBoxOne->GetWindowText(str);
GetDlgItem(IDC_EDIT1)->SetWindowText( _T"FOO" );
也可以
//取值
CString str;
GetDlgItem(IDC_EDIT1)->GetWindowText(str);