摘要:
控件和m_ip关联CIPAddressCtrl m_ip.SetAddress(127,0,0,1);//初始化 可写在OnInitDialogCString ip; m_ip.GetWindowText(ip);//获取IP字符串这个值可以直接作为inet_addr(ip)的输入SOCKADDR_IN serverAddr;serverAddr.sin_family=AF_INET;serverAddr.sin_addr.s_addr=inet_addr(ip);//ipserverAddr.sin_port=htons(port);//portiRet=::connect(s,(socka 阅读全文