Visual c++ MFC函数调用丢失

Visual c++ MFC函数调用丢失,visual-c++,mfc,Visual C++,Mfc,我正在使用基于MFC对话框的应用程序。我想知道,如果我将在文本框控件中以数字格式输入值,例如15119。该值将转换为208.74.77.60。我在这里做代码,但它给了我错误 if(m_txtSIPIP.GetWindowTextW=="15119") { m_txtSIPIP.SetWindowTextW(L"208.74.77.60"); } else if(m_txtSIPIP.GetWindowTextW=="75889") { m_txtSIP

我正在使用基于MFC对话框的应用程序。我想知道,如果我将在文本框控件中以数字格式输入值,例如15119。该值将转换为208.74.77.60。我在这里做代码,但它给了我错误

    if(m_txtSIPIP.GetWindowTextW=="15119")          
{
   m_txtSIPIP.SetWindowTextW(L"208.74.77.60");
}

else if(m_txtSIPIP.GetWindowTextW=="75889")
{
    m_txtSIPIP.SetWindowTextW(L"98.158.148.4");
}

else if(m_txtSIPIP.GetWindowTextW=="81441")
{
    m_txtSIPIP.SetWindowTextW(L"65.111.182.114");
}

else if(m_txtSIPIP.GetWindowTextW=="24149")
{
    m_txtSIPIP.SetWindowTextW(L"192.34.20.119");
}

else if(m_txtSIPIP.GetWindowTextW=="11197")
{
    m_txtSIPIP.SetWindowTextW(L"72.249.184.50");
}
else
{
     m_txtSIPIP.SetWindowTextW(L"");
}

它给我的错误是CWnd::GetWindowTextW':函数调用缺少参数列表;使用“&CWnd::GetWindowTextW”创建指向成员的指针。如何删除此错误。

GetWindowText函数不返回CString。相反,它要求您将对CString的引用作为函数参数传递:

CString s;
m_txtSIPIP.GetWindowTextW(s);
if(s == L"15119")          
{
   m_txtSIPIP.SetWindowTextW(L"208.74.77.60");
}

GetWindowText函数不返回CString。相反,它要求您将对CString的引用作为函数参数传递:

CString s;
m_txtSIPIP.GetWindowTextW(s);
if(s == L"15119")          
{
   m_txtSIPIP.SetWindowTextW(L"208.74.77.60");
}

非常感谢您的帮助。非常感谢您的帮助。这似乎是来自Visual Basic for Applications coder的代码这似乎是来自Visual Basic for Applications coder的代码