Available in LEADTOOLS Medical Imaging toolkits. |
L_DispContainerGetActiveSubCellChangedCallBack
#include "l_bitmap.h"
L_LTIVW_API L_INT EXT_FUNCTION L_DispContainerGetActiveSubCellChangedCallBack (hCon, ppfnCallBack, ppUserData)
HDISPCONTAINER hCon; |
/* handle to the container */ |
DISPCONTAINERACTIVESUBCELLCHANGED * ppfnCallBack; |
/* pointer to the callback function */ |
LPVOID * ppUserData; |
/* pointer to be updated with user data */ |
Gets a callback function that is called every time the user changes the active sub-cell.
Parameter |
Description |
hCon |
Handle to the Container. |
ppfnCallBack |
Pointer to a pointer to a callback function to be updated with the last active sub-cell changed callback function set using L_DispContainerGetActiveSubCellChangedCallBack. |
ppUserData |
Void pointer to be updated with the value of user defined data associated with the status callback. If you are not interested in the user-defined data, pass NULL for this parameter. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
This function gets the active sub-cell changed callback. To set the active sub-cell changed callback use L_DispContainerSetActiveSubCellChangedCallBack.
Required DLLs and Libraries
LTIVW |
See Also
Example
This example will link the active sub-cell of the first cell to the second cell and vice versa.
L_INT EXT_FUNCTION ActiveSubCellChangedCallBack(L_INT nCellIndex, L_INT nSubCellIndex, L_INT nPreviousSubCellIndex, L_VOID * pUserData) { UNREFERENCED_PARAMETER(nPreviousSubCellIndex); HDISPCONTAINER hCon = (HDISPCONTAINER)pUserData; DISPSTACKACTIONPROPS ActionProperties; DISPCELLPROPERTIES CellProp; CellProp.uStructSize = sizeof(DISPCELLPROPERTIES); CellProp.uMask = DCCELLPF_ROWS | DCCELLPF_COLS; L_INT nIndex = (nCellIndex == 1) ? 0 : 1; ActionProperties.DispContainerActionProps.uStructSize = sizeof(DISPSTACKACTIONPROPS); L_DispContainerGetActionProperties(hCon, CONTAINER_ACTION_STACK, nIndex, 0, &ActionProperties, 0); L_DispContainerGetCellProperties(hCon, nIndex, &CellProp, 0); ActionProperties.nActiveSubCell = nSubCellIndex % (CellProp.uNumCols * CellProp.uNumRows); ActionProperties.nScrollValue = nSubCellIndex - ActionProperties.nActiveSubCell; L_DispContainerSetActionProperties(hCon, CONTAINER_ACTION_STACK, nIndex, 0, &ActionProperties, CONTAINER_ACTION_CELLLEVEL); return SUCCESS; } L_INT DispContainerActiveSubCellChangedExample(HDISPCONTAINER hCon) { DISPCONTAINERACTIVESUBCELLCHANGED oldCallBack; L_VOID * pOldUserData; L_DispContainerGetActiveSubCellChangedCallBack(hCon, &oldCallBack, &pOldUserData); L_DispContainerSetActiveSubCellChangedCallBack(hCon, ActiveSubCellChangedCallBack, hCon); return SUCCESS; }