Copying Windows (not the os)

This is a discussion on Copying Windows (not the os) within the Windows Programming forums, part of the Platform Specific Boards category; How do you copy a window? I tried just plain: Code: HWND window1; HWND window2; ... window2=window1; I then changed ...

  1. #1
    Registered User DutchStud's Avatar
    Join Date
    Oct 2001
    Posts
    43

    Lightbulb Copying Windows (not the os)

    How do you copy a window? I tried just plain:
    Code:
    HWND window1;
    HWND window2;
    ...
    window2=window1;
    I then changed the parent of window2, and it moved the button. How can I get a new window, not just a handle (cause that's it, right?) to window2, so I can have two of them?

    by the way, forgive me for playing around with the colors, but it was...uh...fun, kind of.

  2. #2
    Former Member
    Join Date
    Oct 2001
    Posts
    955
    I've heard that you can't actually copy a window, you must recreate everything again, and if you have stuff painted on the other window, use BitBlt, or something like that.

    Oskilian

  3. #3
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Call CreateWindow() twice. You will then get to windows each with their own handle.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  4. #4
    Registered User DutchStud's Avatar
    Join Date
    Oct 2001
    Posts
    43
    I can't, I didn't create the window in the first place.

  5. #5
    Registered User The15th's Avatar
    Join Date
    Aug 2001
    Posts
    125
    >>I can't, I didn't create the window in the first place.<<

    then where did it come from? I think a little more explaining is in order here. What kind of window is it, if you didnt create it?
    arrh, i got nothing good to say.
    http://www.praxis1.vic.edu.au/home/dcola/

  6. #6
    Registered User DutchStud's Avatar
    Join Date
    Oct 2001
    Posts
    43

    A Little More Explaining

    It's a window from another program (which I also, didn't create).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program works on Windows XP and 2000, not on 98 or ME
    By MidnightlyCoder in forum C++ Programming
    Replies: 7
    Last Post: 03-10-2006, 02:36 PM
  2. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 09:00 AM
  3. Windows 98/2000 programming in Windows XP
    By Bill83 in forum Windows Programming
    Replies: 3
    Last Post: 07-22-2005, 02:16 PM
  4. Dialog Box Problems
    By Morgul in forum Windows Programming
    Replies: 21
    Last Post: 05-31-2005, 05:48 PM
  5. Copying OS Partition
    By XSquared in forum Tech Board
    Replies: 13
    Last Post: 12-04-2003, 12:18 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21