GetTabPageFromPoint
int GetTabPageFromPoint (int panelHandle, int controlID, Point point, int *index, int *area);
Purpose
Returns the area of the tab control that contains the point you specify.
Supported Controls
You can use GetTabPageFromPoint with tab controls.
Parameters
Input | ||
Name | Type | Description |
panelHandle | int | Specifier for a particular panel that is currently in memory. You can obtain this handle from functions such as LoadPanel and NewPanel. |
controlID | int | 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 functions such as NewCtrl and DuplicateCtrl. |
point | Point |
A Point structure specifying the coordinates of a point in the control. The Point structure is defined as follows: typedef struct { int x; int y; } Point; You can create a Point without having to declare a variable by using the following function: Point MakePoint (int x, int y); For example, for a mouse click event in a callback function for a control, eventData1 is the mouse vertical position, and eventData2 is the mouse horizontal position. GetTabPageFromPoint (panelHandle, controlID, MakePoint (eventData2, eventData1), &index, &area); |
Output | ||
Name | Type | Description |
index | int | Returns the zero-based index of the tab page that contains the point you specify. Returns –1 when the point is not in any of the tabs. |
area | int |
Returns one of the following constants to indicate which area of the tab control contains the specified point: VAL_OTHER_AREA VAL_TAB_AREA VAL_TAB_CLOSE_PAGE_AREA VAL_TAB_PAGE_AREA VAL_TAB_SCROLL_NEXT_AREA VAL_TAB_SCROLL_PREV_AREA VAL_BEFORE_FIRST_TAB_AREA VAL_AFTER_LAST_TAB_AREA |
Return Value
Name | Type | Description |
status | int | Return value indicating whether the function was successful. A negative number indicates that an error occurred. |
Additional Information
Library: User Interface Library
Include file: userint.h
LabWindows/CVI compatibility: LabWindows/CVI 8.0 and later