# GetAnnotationIndexFromCaption

int GetAnnotationIndexFromCaption (int panelHandle, int controlID, char *captionText, int begIndex, int *annotationIndex);

## Purpose

Returns the 1-based index of the first graph annotation after begIndex that contains captionText in its caption. This function returns the index on a partial match, so captionText does not have to match the caption exactly.

| Note This function uses case-sensitive comparison.

## Parameters

Input
Name | Type | Description
panelHandle | integer | Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.
controlID | integer | The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl.
captionText | char * | The text to find in the graph annotation captions. This function returns the index on a partial match, so captionText does not have to match the caption exactly to return the caption index.
begIndex | integer | The annotation index from which to start searching.
Output
Name | Type | Description
annotationIndex | integer | The one-based index of the first graph annotation that contains captionText in its caption.

## Return Value

Name | Type | Description
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred.
Code | Error Message String
xx | Success