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
Defines the picture displayed in the row/column header.
C
BOOL WINAPI SftTree_GetRowColHeaderPicture(HWND hwndCtl, LPSFT_PICTURE lpPicture); BOOL WINAPI SftTree_SetRowColHeaderPicture(HWND hwndCtl, LPCSFT_PICTURE lpPicture); BOOL WINAPI SftTreeSplit_GetRowColHeaderPicture(HWND hwndCtl, LPSFT_PICTURE lpPicture); BOOL WINAPI SftTreeSplit_SetRowColHeaderPicture(HWND hwndCtl, LPCSFT_PICTURE lpPicture);
C++
BOOL CSftTree::GetRowColHeaderPicture(LPSFT_PICTURE lpPicture) const; BOOL CSftTree::SetRowColHeaderPicture(LPCSFT_PICTURE lpPicture); BOOL CSftTreeSplit::GetRowColHeaderPicture(LPSFT_PICTURE lpPicture) const; BOOL CSftTreeSplit::SetRowColHeaderPicture(LPCSFT_PICTURE lpPicture);
hwndCtl
The window handle of the tree control.
lpPicture
A pointer to a SFT_PICTURE structure to be used as row/column header picture. If the SFT_PICTURE structure defines a bitmap handle, the top, left pixel of the bitmap must contain the image's background color. This color will be replaced by the actual window background color when the bitmap is displayed. This parameter may be NULL to remove the row/column header picture.
Get/SetRowColHeaderPicture returns TRUE if the function was successful, otherwise FALSE is returned.
The GetRowColHeaderPicture and SetRowColHeaderPicture functions define the picture displayed in the row/column header.
Get/SetRowColHeaderPicture can be used to define a row/column header picture using a bitmap, icon or ImageList image.
The dimensions of the picture are used to calculate the minimum dimension for the row headers, column headers and row/column headers, so pictures displayed in row headers, column headers and row/column headers are never clipped vertically.
The horizontal and vertical alignment of the row/column picture is defined using RowColHeaderPictureStyle.
The row/column header area is only shown if row headers and column headers are both shown (see SetShowRowHeader and SetShowHeader).
CellInfo.index = index; CellInfo.iCol = 0; SftTree_GetCellInfo(hwndTree, &CellInfo); Sft_GetPictureSize(&CellInfo.Cell.CellPicture1, &w, &h); if (w <= PIC_SIZEX || h <= PIC_SIZEY) { // don't use images that are too large for the header // copy it to row/column header and column header SftTree_SetRowColHeaderPicture(hwndTree, &CellInfo.Cell.CellPicture1);/* Row/column picture */ nCols = SftTree_GetColumnsEx(hwndTree, &lpCol);/* Get column attributes */ Sft_CopyPicture(&lpCol[1].Picture1, &CellInfo.Cell.CellPicture1); // second column SftTree_SetColumnsEx(hwndTree, nCols, lpCol); /* Set new column attributes */ } else { SftTree_SetRowColHeaderPicture(hwndTree, NULL);
CellInfo.index = index; CellInfo.iCol = 0; m_Tree.GetCellInfo(&CellInfo); Sft_GetPictureSize(&CellInfo.Cell.CellPicture1, &w, &h); if (w <= PIC_SIZEX || h <= PIC_SIZEY) { // don't use images that are too large for the header // copy it to row/column header and column header m_Tree.SetRowColHeaderPicture(&CellInfo.Cell.CellPicture1);/* Row/column picture */ nCols = m_Tree.GetColumns(&lpCol);/* Get column attributes */ Sft_CopyPicture(&lpCol[1].Picture1, &CellInfo.Cell.CellPicture1); // second column m_Tree.SetColumns(nCols, lpCol); /* Set new column attributes */ } else { m_Tree.SetRowColHeaderPicture(NULL);
See Also C/C++ API | Categories | Notifications