CIPAddressCtrl --> CString
void g_IPToStr(DWORD dip, char outbuf[16])
{
ZeroMemory(outbuf,16);
WORD add1,add2,add3,add4;
//WORD A 16-bit unsigned integer.
//DWORD A 32-bit unsigned integer or the address of a segment and its associated offset.
add1=(WORD)(dip&255);
add2=(WORD)((dip>>8)&255);
add3=(WORD)((dip>>16)&255);
add4=(WORD)((dip>>24)&255);
sprintf(outbuf,"%d.%d.%d.%d",add4,add3,add2,add1);
}