CString strIP="192.168.1.184"; DWORD dwAddress= ntohl( inet_addr(strIP)); m_IPAddr.SetAddress(dwAddress);
DWORD dwMainServerIP; m_MainServerIPCtrl.GetAddress(dwMainServerIP); strMainServerIP.Format(_T("%d.%d.%d.%d"), (dwMainServerIP>>24)&0xff, (dwMainServerIP>>16)&0xff, (dwMainServerIP>>8)&0xff, dwMainServerIP&0xff ) ;