How do I make more than one copy of a window. Let us say, I have created a window, then how can I show two same windows ?
I tried ShowWindow but it just show the window that is already open. I does not make a copy of the window:(
Printable View
How do I make more than one copy of a window. Let us say, I have created a window, then how can I show two same windows ?
I tried ShowWindow but it just show the window that is already open. I does not make a copy of the window:(
You have to create two windows. Make them from the same class and all will be well :)
Jsut to clarify: make two calls to CreateWindow (or CreateWindowEx) using the same window class. They will share the same WindowProc function, so if you want different functionality in there you'll need to check the hwnd of the window in your WindowProc to see which window sent the message.
But what if I want to create unlimited windows?
Do I just create an array of hWnds and whenever I window is created, the value of the current array goes up by 1?
You could do it that way. I'd probably use a vector for easier management (unless speed is of the essence).