Thread View: borland.public.cppbuilder.nativeapi
2 messages
2 total messages
Started by Old Wolf
Mon, 29 May 2006 22:57
Cloning a window
Author: Old Wolf
Date: Mon, 29 May 2006 22:57
Date: Mon, 29 May 2006 22:57
6 lines
1228 bytes
1228 bytes
If I have the HWND of a top-level window, how can I create another identical window? 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. I suppose I could create a new window with CreateWindowEx, and then recursively go through all of its child windows doing the same. But before I reinvent the wheel I would like to know if anybody has done this before.
Re: Cloning a window
Author: Remy Lebeau (TeamB)
Date: Tue, 30 May 2006 02:30
Date: Tue, 30 May 2006 02:30
29 lines
1950 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads