Available in LEADTOOLS Medical Imaging toolkits. |
L_DispContainerGetRegionCallBack
#include "l_bitmap.h"
L_LTIVW_API L_INT EXT_FUNCTION L_DispContainerGetRegionCallBack(hCon, ppfnCallBack, ppUserData)
HDISPCONTAINER hCon; |
/* handle to the container */ |
DISPCONTAINERREGIONCALLBACK * ppfnCallBack; |
/* pointer to the callback function */ |
LPVOID * ppUserData; |
/* pointer to be updated with user data */ |
Gets the current action callback function along with the user data, which were set using L_DispContainerSetRegionCallBack.
Parameter |
Description |
hCon |
Handle to the Container. |
ppfnCallBack |
Pointer to a pointer to a callback function to be updated with the last pre-paint callback function set using L_DispContainerSetPrePaintCallBack. |
ppUserData |
Void pointer to be updated with the value of user defined data associated with the tag 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. |
Required DLLs and Libraries
LTIVW |
See Also
Example
This function will make the cell set the region handle for all the frame if the user create or updated a region on one of hte frames.
L_INT EXT_CALLBACK RegionCallBack(HRGN hRgn, L_INT nCellIndex, L_INT nSubCellIndex, L_UINT uOperation, L_VOID * pUserData) { UNREFERENCED_PARAMETER(hRgn); UNREFERENCED_PARAMETER(uOperation); HDISPCONTAINER hCon = (HDISPCONTAINER)pUserData; L_INT nCount; HBITMAPLIST hBitmapList; L_HRGN hSubCellRgn; L_INT nI; L_INT nRet = L_DispContainerGetCellBitmapList(hCon, 0, &hBitmapList, 0); if (nRet != SUCCESS) return nRet; L_GetBitmapListCount(hBitmapList, (L_UINT *)&nCount); L_DispContainerGetCellRegionHandle(hCon, nCellIndex, nSubCellIndex, &hSubCellRgn, 0); for (nI = 0; nI < nCount; nI++) { if (nSubCellIndex == nI) continue; L_DispContainerSetCellRegionHandle(hCon, nCellIndex, nI, hSubCellRgn, L_RGN_SET, 0); } DeleteRgn(hSubCellRgn); return SUCCESS; } L_INT DispContainerRegionHandleExample(HDISPCONTAINER hCon) { DISPCONTAINERREGIONCALLBACK oldCallBack; L_DispContainerGetRegionCallBack(hCon, &oldCallBack, NULL); L_DispContainerSetRegionCallBack(hCon, RegionCallBack, hCon); return SUCCESS; }