c++builder6 中子窗体,窗体名是否已经存在的属性是什么?
创建一个MDIapplication,
void __fastcall TMainForm::CreateMDIChild(String Name)
{
TMDIChild *Child;
//--- create a new MDI child window ----
Child = new TMDIChild(Application);
Child->Caption = Name;
Child-> HaveName=false;//这里提示HaveName不是Child成员,可是我看教材上是写的啊if (FileExists (Name))
Child->Memo1->Lines->LoadFromFile(Name);
Child->HaveName=true;//
}
[解决办法]
妖哥给你说的很清楚了啊
class TForm1 : public TForm{__published: // IDE-managed Components TADOQuery *ADOQuery1; void __fastcall FormCreate(TObject *Sender);private: // User declarationspublic: // User declarations __fastcall TForm1(TComponent* Owner); bool HaveName;//这样定义};