# DuplicatePanelTree

int DuplicatePanelTree (int destParentPanelHandle, int originalPanelHandle, char duplicatePanelTitle[], int panelTop, int panelLeft);

## Purpose

Duplicates a panel and its descendents into the specified destination parent panel and returns the duplicate (new) panel handle.

## Parameters

Input
Name | Type | Description
destParentPanelHandle | integer | Handle for the parent panel into which to copy the duplicate panel. To make the panel a top-level panel, pass 0.
originalPanelHandle | integer | Handle of the original panel to duplicate. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.
duplicatePanelTitle | string | Title of the duplicate (new) panel. Pass "" for no title. Pass 0 to use the title of the original panel.
panelTop | integer | Vertical coordinate at which to place the upper left corner of the panel, directly below the title bar. The coordinates must be integer values from –32,768 to 32,767, or VAL_AUTO_CENTER to center the panel. For a top-level panel, (0,0) is the upper-left corner of the screen. For a child panel, (0,0) is the upper-left corner of the parent panel, directly below the title bar, before the parent panel is scrolled.
panelLeft | integer | Horizontal coordinate at which to place the upper left corner of the panel, directly below the title bar. The coordinates must be integer values from –32,768 to 32,767, or VAL_AUTO_CENTER to center the panel. For a top-level panel, (0,0) is the upper-left corner of the screen. For a child panel, (0,0) is the upper-left corner of the parent panel, directly below the title bar, before the parent panel is scrolled.

## Return Value

Name | Type | Description
panelHandle | integer | Value you can use in subsequent function calls to specify this panel. Negative values indicate that an error occurred. Zero is not a valid panel handle.
Code | Error Message String
xx | Success