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 used by SftTree/DLL to retrieve information about one item as it is needed by the tree control.
typedef void (CALLBACK* LPFNSFTTREE_VGETITEM)( HWND hwnd, SFTTREE_DWORD_PTR userData, int totCols, LONG index, LPSFTTREE_ITEM * lplpItem);
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 whose attributes are to be retrieved.
lplpItem
A pointer to a pointer to a SFTTREE_ITEM structure. The callback must set this parameter to point to a properly filled SFTTREE_ITEM structure provided by the callback.
LPFNSFTTREE_VGETITEM defines the type of the virtual data source callback used by SftTree/DLL to retrieve information about one item as it is needed by the tree control.
The callback must return a properly filled SFTTREE_ITEM structure.
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.
The SFTTREE_ITEM structure can return 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.
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.
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.
} } /*------------------------------------------------------------------------------*/ /* This sample code implements the virtual data source member functions to */ /* retrieve/release data from an external data source. */ /*------------------------------------------------------------------------------*/ // Callback of type LPFNSFTTREE_VGETITEM void CALLBACK Tree_VirtualStorageGetItemCallback(HWND hwnd, SFTTREE_DWORD_PTR UserData, int totCols, LONG index, LPSFTTREE_ITEM FAR* lplpItem) { // All item information (including all strings) MUST remain valid until VirtualStorageReleaseItem // is called. For this reason, the strings must be allocated using "calloc/malloc" or be static and CANNOT be // objects located on the stack (i.e., NO local variables).
case SFTTREE_TOOLTIP_COLUMN_HEADER: /* Column header tooltip */ wsprintf(lpszBuffer, _T("A tooltip for column %d"), column); break; default: /* unhandled type (future expansion) */ return; } } // Callback of type LPFNSFTTREE_VGETITEM void CSampleView::VGetItem(int totCols, LONG index, LPSFTTREE_ITEM FAR* lplpItem) { // All item information (including all strings) MUST remain valid until VReleaseItem // is called. For this reason, the strings must be allocated using "new" or be static and CANNOT be // objects located on the stack (i.e., NO local variables). memset(&m_WorkingItem, 0, sizeof(m_WorkingItem));
See Also C/C++ API | Categories | Notifications