void IGraphics::GrayOutControl(int paramIdx, bool gray) { int i, n = mControls.GetSize(); IControl** ppControl = mControls.GetList(); for (i = 0; i < n; ++i, ++ppControl) { IControl* pControl = *ppControl; if (pControl->ParamIdx() == paramIdx) { pControl->GrayOut(gray); } // Could be more than one, don't break until we check them all. } }