HeaderPane
Main
Hide
Share Link
Print

VirtualInitialize

Initializes a combo box control for virtual mode and for use with a virtual data source.

C

BOOL WINAPI SftBox_VirtualInitialize(HWND hwndCtl, LPCSFTBOX_VIRTUALDEF virt);

C++

BOOL CSftBox::VirtualInitialize(LPCSFTBOX_VIRTUALDEF virt);

Parameters

hwndCtl

The window handle of the combo box control.

virt

A pointer to a SFTBOX_VIRTUALDEF structure describing the virtual data source. The version member of the structure must be set to SFTBOX_VERSION. This parameter may be NULL to end virtual mode.

Returns

The return value is TRUE if the function was successful, otherwise FALSE is returned, for example if the version member is not valid or the combo box contains items.

Comments

The VirtualInitialize function initializes a combo box control for virtual mode and for use with a virtual data source.

VirtualInitialize cannot be used while the combo box control contains items added using AddString or InsertString. All items must be removed first, for example using ResetContent.

After a successful call to VirtualInitialize, the combo box is empty. VirtualCount is used to define the number of items available in the virtual data source.

The structure pointed to by virt is copied, so it does not have to remain valid after VirtualInitialize returns. The callback routines receive the window handle of the combo box control.

VirtualInitialize with virt set to NULL ends virtual mode. All items are removed, the static portion or edit control portion no longer shows an item and the combo box no longer uses a virtual data source, so items can be added again using AddString or InsertString. If the combo box does not use a virtual data source, NULL has no effect.

If the dropdown portion of a dropdown or dropdown list combo box is currently displayed, VirtualInitialize hides it.

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


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