HeaderPane
Main
Hide
Share Link
Print

SFTBOX_CELLINFOPARM Structure

The SFTBOX_CELLINFOPARM structure is used as parameter for GetCellInfo and SetCellInfo to retrieve and set cell attributes.

typedef struct tagSftBoxCellInfoParm {
    int version;                            // no longer used (set to 0)
    LONG index;                             // item index
    int iCol;                               // column
    SFTBOX_CELL Cell;                       // cell
} SFTBOX_CELLINFOPARM, * LPSFTBOX_CELLINFOPARM;

typedef const SFTBOX_CELLINFOPARM * LPCSFTBOX_CELLINFOPARM;

Members

version

This member is no longer used and should be set to 0.

index

The zero-based index of the item whose cell attributes are to be set or retrieved. This value can be set to -1 to register a cell picture size. See SetCellInfo for more information.

iCol

The zero-based column number of the cell whose attributes are to be set or retrieved. When used with SetCellInfo, this value can be set to -1 to set the attributes of all cells of the item.

Cell

A structure describing the cell's attributes. See SFTBOX_CELL for more information. h1 Comments

The SFTBOX_CELLINFOPARM structure is used as parameter for GetCellInfo and SetCellInfo to retrieve and set cell attributes. To modify the attributes of a cell, an application sets the index and iCol members, retrieves the current attributes using GetCellInfo, modifies the desired members of the Cell structure and calls SetCellInfo.

Pointer typedefs: LPSFTBOX_CELLINFOPARM is a pointer to a SFTBOX_CELLINFOPARM structure, LPCSFTBOX_CELLINFOPARM is a pointer to a constant SFTBOX_CELLINFOPARM structure.

Examples

C View entire sample code

    lpCol->colorBgEnd = lpCol->colorBgSelEnd = SFTBOX_NOCOLOR;
    lpCol->colorProgress = lpCol->colorProgressEnd = SFTBOX_NOCOLOR;
    lpCol->realPos = lpCol->dispPos = position;
}

static void SetColorSample(HWND hwndBox, LONG index, COLORREF color)
{
    // The color sample is the picture of the cell in the first column.
    SFTBOX_CELLINFOPARM CellInfo;

    memset(&CellInfo, 0, sizeof(CellInfo));
    CellInfo.index = index;
    CellInfo.iCol = 0;
    SftBox_GetCellInfo(hwndBox, &CellInfo);
    Sft_SetPictureColorSample(&CellInfo.Cell.CellPicture1, SAMPLE_SIZE, SAMPLE_SIZE, color, SYSCOLOR(COLOR_WINDOWTEXT));
    SftBox_SetCellInfo(hwndBox, &CellInfo);

C++ View entire sample code

    CDialog::DoDataExchange(pDX);
    DDX_Control(pDX, IDC_BACKGROUND, m_Background);
    DDX_Control(pDX, IDC_TEXT, m_Text);
}

void CMainDlg::SetColorSample(CSftBox& box, LONG index, COLORREF color)
{
    // The color sample is the picture of the cell in the first column.
    SFTBOX_CELLINFOPARM CellInfo;

    memset(&CellInfo, 0, sizeof(CellInfo));
    CellInfo.index = index;
    CellInfo.iCol = 0;
    box.GetCellInfo(&CellInfo);
    Sft_SetPictureColorSample(&CellInfo.Cell.CellPicture1, SAMPLE_SIZE, SAMPLE_SIZE, color, SYSCOLOR(COLOR_WINDOWTEXT));
    box.SetCellInfo(&CellInfo);

See Also C/C++ API | Categories | Notifications


Last Updated 11/21/2026 - (email)
© 2026 Softel vdm, Inc.