Defines the type of the virtual data source callback used by SftBox/DLL to retrieve information about one item as it is needed by the combo box control.
typedef void (CALLBACK* LPFNSFTBOX_VGETITEM)(HWND hwnd, SFTBOX_DWORD_PTR userData, int totCols, LONG index, LPSFTBOX_ITEM * lplpItem);
hwnd
The window handle of the combo box control.
userData
An application-specific value, as supplied in the call to VirtualInitialize using the SFTBOX_VIRTUALDEF structure member userdataVirtPool.
totCols
The total number of columns defined for the combo box control.
index
The zero-based index of the item whose attributes are to be retrieved.
lplpItem
A pointer to a pointer to a SFTBOX_ITEM structure. The callback must set this parameter to point to a properly filled SFTBOX_ITEM structure provided by the callback.
LPFNSFTBOX_VGETITEM defines the type of the callback function addressed by the SFTBOX_VIRTUALDEF structure member lpfnVGetItem. The callback must return a pointer to a properly filled SFTBOX_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 SFTBOX_ITEM structure can contain pointers to additional information. The structure itself and any memory addressed by pointers in the structure must be in static memory or allocated dynamically by the application. All memory is managed by the application; no memory is allocated or freed by SftBox/DLL. The information must remain valid until the LPFNSFTBOX_VRELEASEITEM callback is called for the item.
SftBox/DLL always calls the LPFNSFTBOX_VRELEASEITEM callback for the item last retrieved before calling the LPFNSFTBOX_VGETITEM callback for another item, so an application can free any storage that was dynamically allocated by the callback.
This callback cannot modify the contents of the combo box control in any way. Changing the total number of items (see VirtualCount) is not possible while the callback is called.
See Also C/C++ API | Categories | Notifications