Article View: borland.public.cppbuilder.nativeapi
Article #2760Re: Application->CreateForm
From: Remy Lebeau (TeamB)
Date: Sat, 25 Nov 2006 01:52
Date: Sat, 25 Nov 2006 01:52
23 lines
1690 bytes
1690 bytes
"Dmitry Konnov" <dmitry@weblinedesign.biz> wrote in message
news:45672a82@newsgroups.borland.com...
> Application->CreateForm(FindClass("EditCardClass"), &a_EditCard);
You don't need to use FindClass(). Use __classid() instead:
Application->CreateForm(__classid(TEditCard), &a_EditCard);
> Is there a possibility to create form with extra parameters in
> constructor by means Application->CreateForm ?
No. CreateForm() can only use the TComponent* constructor and no other.
For what you are asking, you will have to get rid of the CreateForm()
altogether and use the 'new' operator instead (which you should be doing
anyway):
TEditCard *a_EditCard = new TEditCard(whatever parameters you want);
a_EditCard->Show();
Gambit
Technical Details
Message-ID:
<4567a282$3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<45672a82@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,cc726ca6ac385fd3 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <45672a82@newsgroups.borland.com> Subject: Re: Application->CreateForm Date: Fri, 24 Nov 2006 17:52:47 -0800 Lines: 25 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 69.169.4.232 Message-ID: <4567a282$3@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1164419714 69.169.4.232 (24 Nov 2006 17:55:14 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail