BCB遍历所有窗体的组件
1 2 3 4 5 6 7 8 9 10 11 12 | for (iFormIdx=0; iFormIdx<Screen->FormCount; iFormIdx++) { TForm *pForm = Screen->Forms[iFormIdx]; for ( int iCtrlIdx=0; iCtrlIdx<pForm->ControlCount; iCtrlIdx++) { TEdit *pEdit = dynamic_cast <TEdit*>(pForm->Controls[iCtrlIdx]); if (pEdit) { pEdit->Text = "" ; } } } |