if(pCtrl == NULL) return; pCtrl->ClearAddress(); if( nFieldCount == 0) { return; } else if(nFieldCount >= 4) { pCtrl->SetAddress(nField0, nField1, nField2, nField3); return; } int nBit = 3; BYTE byBit[4]; byBit[0] = nField0; byBit[1] = nField1; byBit[2] = nField2; byBit[3] = nField3; HWND hChild = ::GetWindow(pCtrl->m_hWnd, GW_CHILD); while(hChild) { if(nBit < nFieldCount) { TCHAR szBit[4] = {0}; _sntprintf(szBit, sizeof(szBit), _T("%d"), byBit[nBit]); ::SetWindowText(hChild, szBit); } hChild = ::GetWindow(hChild, GW_HWNDNEXT); nBit --; } } |
閺€鎯版閹存劕濮�閺屻儳婀呴弨鎯版>>
0正在阅读:VC学习:IP地址控件小技巧VC学习:IP地址控件小技巧
2004-03-04 10:28
出处:CSDN
责任编辑:linjixiong
键盘也能翻页,试试“← →”键