Click here to Skip to main content
15,877,754 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I need to find a solution to copy and clone a system window, for example, if i open "My documents" or "" in Firefox, i want to dcreate another widnows with the same content,
I open "my documents" = 2 "My documents" windows
Thanks for your help

You can use the DWM to rather easely display the contents, interacting could prove more difficult though. You would have to forward all events you get from input devices to your source window.[^]
I beleave there is an article about this here on the Code Project too, I just can't seem to find it right now.
Share this answer
Espen Harlinn 6-Oct-11 10:40am    
Nice idea :)
Simon Bang Terkildsen 6-Oct-11 12:27pm    
Thank you, Espen. I get one now and then :)
Strictly speaking, this is absolutely impossible. If this is a window from another application and process, you don't have access to the code and data of that process — they are isolated; and the details of the other process's behavior affect the behavior of each window.

You can recursively collect all child windows of some application's main window, for each one, copy it's text, location, size and styles. So, you can roughly mimic the windows structure of source window; but this is pretty much you can do. You can even retrieve a window function of each, but it cannot help you, as each of such functions can run in the context of its own process, not in yours.

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900