# EasyTab_LoadPanels

int EasyTab_LoadPanels (int panel, int tabControl, int row, const char *fileName, void *callingModuleHandle, . . .);

## Purpose

This function loads the specified panels from the .uir file into the Tab control.

| Note The label on each panel's tab is the same as the title of the panel. A pair of underscores may be placed before a character in the panel title to specify that character as an underline accelerator.

## Parameters

Input
Name | Type | Description
panel | integer | The specifier for a particular panel that is currently in memory. This handle will have been returned by the LoadPanel, NewPanel, or DuplicatePanel function.
tabControl | integer | The ID returned by the EasyTab_Create or EasyTab_ConvertFromCanvas function.
row | integer | Specifies the row to which to add the tab buttons for the specified panels. Row numbers begin at 1. Gaps betweens rows are not allowed. For example, you cannot add panels to row 2 before you have added at least one panel to row 1.
fileName | const char * | The name of the User Interface Resource file that contains the panels. You can use a complete pathname or a simple filename. If the name is a simple filename (i.e., contains no directory path), then the following applies: If the file is listed in the project, then the file is loaded using the pathname from the project. Otherwise, the file is loaded from the directory containing the project.
callingModuleHandle | void * | Use the default parameter, _CVIUserHInst, to specify the handle of the module that contains the call to EasyTab_LoadPanels. This insures that your callback functions will be linked when calling this function from either a DLL or an executable. For a more detailed discussion of this parameter, refer to the documentation for LoadPanelEx.
panelIDsAndHandlePointers |  | A zero-terminated list of argument pairs, one pair for each panel to load into the tab control. Each pair consists of a panel resource ID and a pointer to an integer in which to store the panel handle. The resource IDs and integer pointers are listed in pairs, with the resource ID preceding the integer pointer. If you do not need the panelHandle for a particular panel, you may pass 0 instead of the integer pointer. Example: int panel1, panel3; EasyTab_LoadPanels(parentPanel, tabCtrl, row, "sample.uir", _CVIUserHInst, PANEL_1, &panel1, PANEL_2, 0, PANEL_3, &panel3, 0);
| Note The 0 following PANEL_2 indicates that the panel handle for PANEL_2 is not needed. The 0 following &panel3 marks the end of the argument list. The reason the first 0 does not mark the end of the argument list is that it occurs where a pointer is expected instead of where a resource ID is expected.
| Note A zero (0) MUST be the last parameter, and it must appear where a resource ID (rather than an integer pointer) is expected. This function relies on finding a resource ID with the value of zero to determine when the argument list ends.
| Note Because all panels added to a Tab control are child panels of the Tab control's parent panel, they are automatically discarded when the parent panel is discarded.

## Return Value

Name | Type | Description
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred. The possible negative error codes are:
Return Values: | 0 Success
–1 to –999 | A User Interface Library error code. (Constants are available in userint.h.)
| –5000 to –5499 | A Toolbox instrument driver error code. (Constants are available in toolbox.h.)

A description of any of these error codes can be obtained using the GetGeneralErrorString function in the toolbox.fp instrument driver.