SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Calculates a cell's optimal height and width so its contents aren't truncated.
C
int WINAPI SftTree_CalcOptimalCellDimensions(HWND hwndCtl, int index, int realCol, int maxAllowedWidth, LPINT lpWidth, LPINT lpHeight); int WINAPI SftTreeSplit_CalcOptimalCellDimensions(HWND hwndCtl, int index, int realCol, int maxAllowedWidth, LPINT lpWidth, LPINT lpHeight);
C++
int CSftTree::CalcOptimalCellDimensions(int index, int realCol, int maxAllowedWidth, int& Width, int& Height) const; int CSftTreeSplit::CalcOptimalCellDimensions(int index, int realCol, int maxAllowedWidth, int& Width, int& Height) const;
hwndCtl
The window handle of the tree control.
index
The zero-based index of the item, whose cell dimensions are to be calculated.
realCol
The zero-based column number of the cell.
maxAllowedWidth
Defines the maximum allowed width to consider. Specify -1 to allow the width to be optimal for the cell contents.
lpWidth, Width
Returns the calculated width, in pixels.
lpHeight, Height
Returns the calculated height, in pixels.
CalcOptimalCellDimensions returns 1- if an error occurs, 0 otherwise.
The CalcOptimalCellDimensions function calculates a cell's optimal height and width so its contents aren't truncated.
Typically, the MakeColumnOptimal function can be used instead to let the control determine the optimal column width.
See Also C/C++ API | Categories | Notifications