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 type of the virtual data source callback called by SftTree/DLL to release information previously returned by the SFTTREE_VGETITEM callback.
typedef void (CALLBACK* LPFNSFTTREE_VRELEASEITEM)( HWND hwnd, SFTTREE_DWORD_PTR userData, int totCols, LONG index, LPSFTTREE_ITEM lpItem);
hwnd
The window handle of the tree control.
userData
An application-specific value, as supplied in the call to VirtualInitialize using the SFTTREE_VIRTUALDEF structure.
totCols
The total number of columns defined for the tree control.
index
The zero-based index of the item to be released.
lpItem
A pointer to the SFTTREE_ITEM structure returned by the previous call to the SFTTREE_VGETITEM callback.
This callback is only used if a virtual data source has been defined using VirtualInitialize. If items are added using AddString or InsertString, the callback is not used.
SftTree/DLL will always call SFTTREE_VRELEASEITEM before calling SFTTREE_VGETITEM for a new item, so an application can free any storage that was dynamically allocated by the callback. SFTTREE_VRELEASEITEM can be used to free any dynamically allocated memory.
The SFTTREE_ITEM structure was returned by SFTTREE_VGETITEM and can contain pointers to additional information. Any memory addressed by pointers returned in the structure must be in static memory or allocated dynamically. All memory is managed by the called application and no memory is allocated or freed by SftTree/DLL.
This callback cannot modify the contents of the tree control in any way. Updating the total number of items is not possible while the callback is called.
if ((index % 8) == 0) {/*randomly add bitmaps */ Sft_SetPictureBitmap(&rowInfo.RowPicture1, m_hRowBitmap);/* Row header picture */ rowInfo.flag = SFTTREE_BMP_LEFT; /* Row header picture alignment */ } *lplpItem = &m_WorkingItem; } // Callback of type LPFNSFTTREE_VRELEASEITEM void CALLBACK Tree_VirtualStorageReleaseItemCallback(HWND hwnd, SFTTREE_DWORD_PTR UserData, int totCols, LONG index, LPSFTTREE_ITEM lpItem) { // free storage allocated during previous Tree_VirtualStorageGetItemCallback call } /**********************************************************************/
if ((index % 8) == 0) {/*randomly add bitmaps */ Sft_SetPictureBitmap(&m_WorkingItem.lpRow->RowPicture1, m_RowBitmap); m_WorkingItem.lpRow->flag = SFTTREE_BMP_LEFT; /* Row header bitmap alignment */ } *lplpItem = &m_WorkingItem; } // Callback of type LPFNSFTTREE_VRELEASEITEM void CSampleView::VReleaseItem(int totCols, LONG index, LPSFTTREE_ITEM lpItem) { // free storage allocated during previous VGetItem call int col; if (m_WorkingItem.alpszString) { // free string array previously allocated for (col = 0 ; col < totCols ; ++col) { if (m_WorkingItem.alpszString[col])
See Also C/C++ API | Categories | Notifications