如何在MDI中同時關掉兩各chid視窗 |
尚未結案
|
xstream71
一般會員 發表:4 回覆:0 積分:0 註冊:2006-09-26 發送簡訊給我 |
在MDI中開了兩各childForm
分別為A視窗與B視窗 如何按A視窗的叉叉時 不僅能關掉A視窗 連B也一起關掉 //-------------------------------------------------------- 由於我的childForm有兩種 A和B是不同Form 我利用Tag找到我要關的相對應的Form MDIForm中 void TMainForm::CloseB(unsigned short int index) { for(int i=0; i < this->MDIChildCount; i ){ if(this->MDIChildren[i]->Tag==3){ BForm=(TBForm*)MainForm->ActiveMDIChild; if(BForm->caseNum==index){ BForm->FormClose(????? , ????);<----不知道要放啥 //BForm->Close();//這樣寫compiler ok但執行會錯誤 } } } } A的 FormClose寫 void __fastcall TAForm::FormClose(TObject *Sender,TCloseAction &Action) { Action = caFree; TMainForm *tf; tf->CloseB(caseNum); } 請高手幫忙,感激不盡 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |