OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Defining the Transfer Buffer

The transfer buffer is a structure with one member for each control participating in the transfer.

These members are known as instance variables. A window or dialog box can also have controls with no states to transfer. For example, by default, buttons, group boxes, and static controls do not participate in transfer. The type of the control determines the type of member needed in the transfer buffer.

To define a transfer buffer, define an instance variable for each participating control in the dialog box or window. It is not necessary to define an instance variable for every control, only for those controls you want to transfer values to and from. The transfer buffer stores one of each type of control, except buttons, group boxes, and static controls. For example:

{
char editCtl[sizeOfEditCtl]; // edit control
uint16 checkBox; // check box
uint16 radioButton; // radio button
TListBoxData listBox; // list box
TComboBoxData comboBox; // combo box
TScrollBarData scrollBar; // scroll bar
};

Each type of control has different information to store. The following table explains the transfer buffer for each of ObjectWindows' controls.

Transfer buffer members for each type of control

Control typeTypeDescription
Staticchar arrayA character array up to the maximum length of text allowed, plus the terminating NULL. By default, static controls do not participate in transfer, but you can explicitly enable them.
Editchar arrayA character array up to the maximum length of text allowed, plus the terminating NULL.
List boxTListBoxDataAn instance of the TListBoxData class; TListBoxData has several members for holding the list box strings, item data, and the selected indexes.
Combo boxTComboBoxDataAn instance of the TComboBoxData class; TComboBoxData has several members for holding the combo box list area strings, item data, the selection index, and the contents of the edit area.
Check box or radio button uint16BF_CHECKED, BF_UNCHECKED, or BF_GRAYED, indicating selection box state.
Scroll barTScrollBarDataAn instance of TScrollBarData, which has three int members:
  • LowValue – minimum range
  • HighValue – maximum range
  • Position – current thumb position.

See Also