Contents page



        NewWindow = (struct NewWindow *) DupeNewWindow(NewWindow)


        This makes a copy of the supplied NewWindow structure and its Gadget list.
        Gadget structures are allocated and copied into. Where appropriate,
        StringInfo and PropInfo structures are allocated. For StringInfo structures,
        a string buffer is also allocated and the original string copied into it.
        Images, Borders, and IntuiText structures are not copied, rather they are
        pointed to. This is because they are used only for rendering, so there is no
        danger in having seversl different windows use these same structures, since
        they are intend to be read only. If for some reasons, you wish to use others,
        you may put them in after thelist ist duplicated.
        The purpose of this routine is to provide a method for generating multiple
        copies of the same window, so they can run concurrently.
        To do this, create your static NewWindow structure und Gadget list (you could
        use POWERWindows). Dupe it. You might then create a task opens that window.
        Dupe the NewWindow again and create another task that opens another window.
        Althought identical copies of the same window will exist on the screen,
        mucking with one can not effect the other. When each task is done, it closes
        its window, then returns the NewWindow and Gadget list with a call to
        Note that now you are generating Gadgets dynamically, you will need to use
        GetGadget if you wish to access a particular gadget, since the gadget address
        can't be hard coded (nor should it be).


        NewWindow = Pointer to the NewWindow structure to copy


        NewWindow = Pointer to the copied NewWindow, or NULL if it ran out of memory.