🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3567

Re: Cloning a window

#3567
From: Remy Lebeau (TeamB)
Date: Tue, 30 May 2006 02:30
29 lines
1950 bytes
"Old Wolf" <oldwolf@inspire.net.nz> wrote in message
news:447b7c4f$1@newsgroups.borland.com...

> If I have the HWND of a top-level window, how can I create another
identical window?

You would have to recersively call GetClassName(), GetWindowLong(), etc to
gather information about the window and all of its child windows, and then
use CreateWindowEx() to recursively create and position new instances of
each one.  Even then, that only duplcates the parent/child hierarchy, but
there is no guarantee that the internal data of the windows can be copied so
that the clones actually function properly.

> The reason for this is the same reason as you would create multiple
instances
> of a TForm-derived dialog, although in this case I only have the HWND to
work from.

Just having the HWND is not enough to guarantee that you can clone
everything that matters.

> I suppose I could create a new window with CreateWindowEx, and then
> recursively go through all of its child windows doing the same.

That is all you can do.


Gambit
Technical Details
Message-ID: <447bb059$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <447b7c4f$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,f8bf36be28763607
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: <447b7c4f$1@newsgroups.borland.com>
Subject: Re: Cloning a window
Date: Mon, 29 May 2006 19:30:49 -0700
Lines: 31
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: 68.69.17.41
Message-ID: <447bb059$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1148956761 68.69.17.41 (29 May 2006 19:39:21 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail