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 = "";
       }
   }
}

  

posted @ 2015-08-26 15:59  皮皮鲁PPL  阅读(438)  评论(0)    收藏  举报
点击右上角即可分享
微信分享提示