方法一
CString strIP="192.168.1.184";
DWORD dwAddress= ntohl( inet_addr(strIP));
m_IPCtrl.SetAddress(dwAddress); // m_IPCtrl 為IP 控件對象
方法二
直接用SetWindowText(),擷取采用GetWindowText()就OK了!
CString strIP= "192.168.1.163 ";
m_ip.SetWindowText(strIP); //m_ip為IP控件的變量