Article View: borland.public.cppbuilder.nativeapi
Article #9882Re: Creating child windows
From: Remy Lebeau (TeamB)
Date: Wed, 02 Jun 2004 03:36
Date: Wed, 02 Jun 2004 03:36
32 lines
2026 bytes
2026 bytes
"Don Peterson" <Ceedeep@aol.com> wrote in message
news:40bd2490@newsgroups.borland.com...
> I'm new to Borland and to C++.
I suggest you read the Developers Guide and Tutorials that ship with BCB,
and any of a number of third-party tutorials online.
> But how do I do this? What is the name of the function
> that will produce this other window at run time?
It is not a function. Those "windows" are self-contained objects. You
simply instantiate an instance of the desired class type using the 'new'
operator. By default, the first form created by the IDE's wizard is named
"Form1" and has a class type of TForm1. You can change the name to anything
you want. Then when you create additional forms, you use the File | New |
Form" menu item, and then name and design the new form however you want.
When you are ready to display the form, you simply create an instance of it,
ie:
#include "MyQueryForm.h"
//...
TMyQueryForm *query = new TMyQueryForm(this);
if( query->ShowModal() == mrOk )
// do something ...
delete query;
Gambit
Technical Details
Message-ID:
<40bd4c3a$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!news.linkpendium.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<40bbc5aa$1@newsgroups.borland.com> <40bbe2db@newsgroups.borland.com> <40bd2490@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,8a108b4b044d125f X-Google-Attributes: gid10cc67,public From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <40bbc5aa$1@newsgroups.borland.com> <40bbe2db@newsgroups.borland.com> <40bd2490@newsgroups.borland.com> Subject: Re: Creating child windows Date: Tue, 1 Jun 2004 20:36:22 -0700 Lines: 34 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: 67.22.135.163 Message-ID: <40bd4c3a$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1086147642 67.22.135.163 (1 Jun 2004 20:40:42 -0700) Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!news.linkpendium.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail