# CallPanelCallback

int CallPanelCallback (int panel, int event, int eventData1, int eventData2, int *returnValue);

## Purpose

This function calls the callback function for a panel with the specified parameters.

If the panel does not have a callback function then nothing is done.

One use of this function is to send user defined events to a panel whose behavior has been customized using the ChainPanelCallback function.

## 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.
event | integer | Pass the event number of the event to send to the panel's callback. This event can be a predefined event from userint.h (such as EVENT_COMMIT) or a user defined event (in the range from 1000 to 10000). This function only calls the callback function for the panel (if any). No panel operation related the event will occur. For example, calling a panels callback with EVENT_PANEL_MOVE will NOT cause the panel to move.
eventData1 | integer | Pass data related to the event being sent.
eventData2 | integer | Pass additional data related to the event being sent.
Output
Name | Type | Description
returnValue | integer * | Pass the address of an integer variable in which to store the value returned by the callback function. If the return value of the callback function is not needed, you can pass zero (0) for this parameter.

## Return Value

Name | Type | Description
status | integer | Returns a positive number if the panel's callback was called, zero (0) if the panel does not have a callback function, or a negative error code if the function failed. The possible negative error codes are:
–1 to –999 | A User Interface Library error code. (Constants are available in userint.h.)
A description of any of these error codes can be obtained using the GetGeneralErrorString function in the toolbox.fp instrument driver.