IDC_TESTIP IDC_TESTEDIT自定义资源ID
CIpAddressCtrl m_TestIpAddress;
CEdit m_TestEdit;
CFont* pFont = m_List.GetFont();//获得父窗口字体
m_TestIpAddress.Create(WS_CHILD | WS_VISIBLE,CRect(0,0,120,40),this,IDC_TESTIP);//创建窗口
m_TestIpAddress.SetFont(pFont);//设置字体
m_TestIpAddress.ModifyStyleEx (WS_EX_CLIENTEDGE, 0);//去边框
m_TestIpAddress.SetAddress(192,168,1,1);
m_TestIpAddress.ShowWindow(SW_HIDE);
m_TestEdit.Create(WS_CHILD | WS_VISIBLE,CRect(0,0,120,40),this,IDC_TESTEDIT);
m_TestEdit.SetFont(pFont);
m_TestEdit.ShowWindow(SW_HIDE);