回 帖 发 新 帖 刷新版面

主题:关于 FormExist 函数

TForm* TfmMain::FormExist(AnsiString szCaption)
{
    for(int i=0; i<this->MDIChildCount; i++)
    {
        TForm *pForm = this->MDIChildren[i];
        if(pForm->Caption == szCaption)
            return pForm;   
    }
    return NULL;    
}
小弟不懂 这个事件函数是从哪冒出来的?  各位大侠们解释一下行吗?

回复列表 (共2个回复)

沙发


dddd

板凳

FormExist是在主窗体TfmMain中自定义的成员函数,目的是查找Caption是szCaption的子窗体。若找到则返回这个子窗体,否则返回NULL。

我来回复

您尚未登录,请登录后再回复。点此登录或注册