C++Builder 增加IPEdit控件
2019-02-17 14:03 su_hq 阅读(478) 评论(0) 编辑 收藏 举报HWND hwIpEdit;
hwIpEdit = CreateWindow(WC_IPADDRESS, NULL, WS_CHILD | WS_VISIBLE, 1, 1, 136, 24, Handle, 0, HInstance, NULL);
int nIP;
SendMessage(hwIpEdit, IPM_GETADDRESS, 0, int(&nIP));
nIP = MAKEIPADDRESS(192, 168, 0, 1);
SendMessage(hwIpEdit, IPM_SETADDRESS, 0, nIP);
SendMessage(hwIpEdit, IPM_SETFOCUS, 3, 0);
SendMessage(hwIpEdit, IPM_CLEARADDRESS, 0, 0);