CString str;
str="abc";
if(m_string.GetPasswordChar()==str)
{
MessageBox("very good!");
}
else
{
MessageBox("so bad!");
}TNND,怎么就是不行。

解决方案 »

  1.   

    CString str,s1;
    str="abc";
              m_string.GetWindowText(s1)
    if(s1==str)
    {
    MessageBox("very good!");
    }
    else
    {
    MessageBox("so bad!");
    }
      

  2.   

    small_wei(small)谢谢你。但是,我用  GetPasswordChar()怎么不行呢?还有,我怎么给你分啊?
      

  3.   

    CEdit::GetPasswordChar 
    TCHAR GetPasswordChar( ) const;Return ValueSpecifies the character to be displayed in place of the character typed by the user. The return value is NULL if no password character exists.ResCall this function to retrieve the password character displayed in an edit control when the user enters text. If the edit control is created with the ES_PASSWORD style, the default password character is set to an asterisk (*).GetPasswordChar()取出的应该是"*"
    点击管理就可以给分了