# NewPanel

int NewPanel (int parentPanelHandle, char panelTitle[], int panelTop, int panelLeft, int panelHeight, int panelWidth);

## Purpose

Creates a new top-level panel or a new child panel inside a specific parent panel. This function returns a panel handle that you use to specify the new panel in subsequent function calls.

To make the panel a top-level panel, enter 0 for the parentPanelHandle parameter.

If you call this function to create a child panel, you must do so in the same thread in which you create the parent panel.

## Parameters

Input
Name | Type | Description
parentPanelHandle | integer | Handle of the panel into which to load the panel as a child panel. Pass 0 to load the panel as a top-level window.
panelTitle | string | Title for the new 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.
panelHeight | integer | Vertical size of the new panel. The height of the panel does not include the title bar or panel frame. panelHeight can be any integer value from 0 to 32,767.
panelWidth | integer | Horizontal size of the new panel in window coordinates. The width of the panel does not include the panel frame. panelWidth can be any integer value from 0 to 32,767.

## 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