Available in LEADTOOLS Medical Imaging toolkits. |
L_DispContainerGetCellCount
#include "ltivw.h"
L_LTIVW_API L_INT L_DispContainerGetCellCount(hCon, uFlags)
HDISPCONTAINER hCon; |
/* handle to the container */ |
L_UINT uFlags; |
/* reserved for future use */ |
Returns the number of cells managed by the container.
Parameter |
Description |
hCon |
Handle to the container. |
uFlags |
Reserved for future use. Pass 0. |
Returns
>= 0 |
The number of cells managed by the container. |
< 0 |
An error occurred. Refer to Return Codes. |
Comments
To add cells to the container, call L_DispContainerInsertCell. To remove one or more cells from the container, call L_DispContainerRemoveCell.
Please note that the maximum number of rows that a container can have is 4 and the maximum number of columns is 8. However, the number of cells that can be added to a container is limited only by the available memory.
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. |
See Also
Example
This procedure unfreezes any frozen cell
#if defined LEADTOOLS_V17_OR_LATER L_INT DispContainerGetCellCountExample(HDISPCONTAINER hCon) { L_INT nRet; // Get the cells count. L_INT nCount = L_DispContainerGetCellCount(hCon, 0); L_INT nI; for (nI = 0; nI < nCount; nI++) { L_INT nCellIndex = 0; HWND hCellWnd = L_DispContainerGetCellWindowHandle(hCon, nCellIndex, 0); // if there is a selected cell make it unselected and vice versa L_BOOL bFreezed = L_DispContainerIsCellFrozen(hCellWnd, 0); if (bFreezed) { nRet = L_DispContainerFreezeCell (hCellWnd, FALSE, 0); if(nRet != SUCCESS) return nRet; } } return SUCCESS; } #else L_INT DispContainerGetCellCountExample(HDISPCONTAINER hCon) { L_INT nRet; // Get the cells count. L_INT nCount = L_DispContainerGetCellCount(hCon, 0); L_INT nI; for (nI = 0; nI < nCount; nI++) { // if there is a selected cell make it unselected and vice versa L_BOOL bFreezed = L_DispContainerIsCellFrozen(hCon, nI, 0); if (bFreezed) { nRet = L_DispContainerFreezeCell (hCon, nI, FALSE, 0); if(nRet != SUCCESS) return nRet; } } return SUCCESS; } #endif