Results 1 to 5 of 5

Thread: making more than one copy

  1. #1

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827

    making more than one copy

    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
    Baaaaaaaaah

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    You have to create two windows. Make them from the same class and all will be well
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    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.
    Harry.

    "From one thing, know ten thousand things."

  4. #4

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    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?
    Baaaaaaaaah

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    You could do it that way. I'd probably use a vector for easier management (unless speed is of the essence).
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width