我把几个Edit Control控件添加了CString变量
在某成员函数中,我先把CString变量清空 xxx.Empty()
然后根据条件有些赋值了有些没赋值,之后调用UpdateData(FALSE)
可是觉得不赋值的调用该函数之后还是有内容,而不是想要的未赋值的就清空了
为什么控件
在某成员函数中,我先把CString变量清空 xxx.Empty()
然后根据条件有些赋值了有些没赋值,之后调用UpdateData(FALSE)
可是觉得不赋值的调用该函数之后还是有内容,而不是想要的未赋值的就清空了
为什么控件
void Empty( );ResMakes this CString object an empty string and frees memory as appropriate.For more information, see n Visual C++ Programmer’s GuideExampleThe following example demonstrates the use of CString::Empty.// example for CString::Empty
CString s( "abc" );
s.Empty();
ASSERT( s.GetLength( ) == 0 );
CString Overview | Class Members | Hierarchy ChartSee Also CString::IsEmpty
你在要设置编辑框值的时候直接调用这个函数多方便
SetDlgItemText(IDC_EDIT, str);