|
Available in LEADTOOLS Medical Imaging toolkits. |
L_DispContainerFreezeSubCell
#include "l_bitmap.h"
L_LTIVW_API L_INT EXT_FUNCTION L_DispContainerFreezeSubCell(hCon, nCellIndex, nSubCellIndex, bFreeze, uFlags)
|
HDISPCONTAINER hCon; |
/* handle to the container */ |
|
L_INT nCellIndex; |
/* index of a cell */ |
|
L_INT nSubCellIndex; |
/* index into the image list attached to the cell */ |
|
L_BOOL bFreeze; |
/* flag */ |
|
L_UINT uFlags; |
/* reserved for future use */ |
Freezes the sub-cell with the specified index.
|
Parameter |
Description |
|
|
hCon |
Handle to the container. |
|
|
nCellIndex |
A zero-based index of the cell that contains the sub-cell being frozen. Pass -1 to freeze the sub-cell with nSubCellIndex of all cells managed by the container. Pass -2 to freeze the sub-cell with nSubCellIndex of the selected cells managed by the container. |
|
|
nSubCellIndex |
A zero-based index into the image list attached to the cell specified in nCellIndex. This sub-cell will be toggled to frozen or not frozen. Pass -1 to apply this effect on all sub-cells. Pass -2 to apply this effect on the selected sub-cell. |
|
|
bFreeze |
Flag that indicates whether to freeze or unfreeze the sub-cell at the specified index. Possible values are: |
|
|
|
Value |
Meaning |
|
|
TRUE |
Freeze the sub-cell. |
|
|
FALSE |
Unfreeze the sub-cell. |
|
uFlags |
Reserved for future use. Pass 0. |
|
Returns
|
SUCCESS |
The function was successful. |
|
< 1 |
An error occurred. Refer to Return Codes. |
Comments
The properties of a frozen sub-cell cannot be modified except by manually setting them using L_DispContainerSetActionProperties function.
To determine whether a sub-cell is frozen, call the L_DispContainerIsSubCellFrozen function. To determine whether a cell is frozen, call L_DispContainerIsCellFrozen function.
To freeze all cells call L_DispContainerFreezeCell function.
Required DLLs and Libraries
|
LTIVW For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Platforms
Windows 2000 /XP/Vista.
See Also
Example
This example will freeze the even subcell and then type the word frozen in the middle of the frozen sub-cells.
#if defined (LEADTOOLS_V16_OR_LATER)
L_INT EXT_CALLBACK PostPaintCallBack (pDISPCONTAINERCELLINFO pCellInfo,
L_VOID * pUserData)
{
HDISPCONTAINER hCon = (HDISPCONTAINER)pUserData;
if (L_DispContainerIsSubCellFrozen(hCon, pCellInfo->nCellIndex, pCellInfo->nSubCellIndex, 0))
{
HPEN hPen = CreatePen(PS_SOLID, 2, RGB(255, 0, 0));
HPEN hOldPen = SelectPen(pCellInfo->hDC, hPen);
MoveToEx(pCellInfo->hDC, pCellInfo->rcRect.left, pCellInfo->rcRect.top, NULL);
LineTo(pCellInfo->hDC, pCellInfo->rcRect.right, pCellInfo->rcRect.bottom);
MoveToEx(pCellInfo->hDC, pCellInfo->rcRect.right, pCellInfo->rcRect.top, NULL);
LineTo(pCellInfo->hDC, pCellInfo->rcRect.left, pCellInfo->rcRect.bottom);
SelectPen(pCellInfo->hDC, hOldPen);
DeletePen(hPen);
}
return SUCCESS;
}
L_INT DispContainerFreezeSubCellExample(HDISPCONTAINER hCon)
{
L_INT nRet;
HBITMAPLIST hBitmapList;
L_INT nCount;
L_INT nI;
DISPCONTAINERPOSTPAINTCALLBACK oldCallBack;
L_VOID * pOldUserData;
nRet = L_DispContainerGetCellBitmapList(hCon, 0, &hBitmapList, 0);
if (nRet != SUCCESS)
return nRet;
L_GetBitmapListCount(hBitmapList, (L_UINT *)&nCount);
for (nI = 0; nI < nCount; nI++)
{
if (((nI >> 1) << 1) == nI )
L_DispContainerFreezeSubCell(hCon, 0, nI, TRUE, 0);
}
L_DispContainerGetPostPaintCallBack(hCon, &oldCallBack, &pOldUserData);
L_DispContainerSetPostPaintCallBack(hCon, PostPaintCallBack, (L_VOID *)hCon);
L_DispContainerRepaintCell(hCon, 0, 0, 0);
return SUCCESS;
}
#endif