OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Using Transfer with a Dialog Box

Because dialog boxes get their definitions and the definitions of their controls from resources, you should construct control objects using the constructors that take resource IDs.

For example:

struct TTransferBuffer {
char edit[30];
TListBoxData listBox;
TScrollBarData scrollBar;
}
.
.
.
TTransferDialog::TTransferDialog(TWindow* parent, int resId)
: TDialog(parent, resId), TWindow(parent)
{
new TEdit(this, ID_EDIT, 30);
new TListBox(this, ID_LISTBOX);
new TScrollBar(this, ID_SCROLLBAR);
SetTransferBuffer(&TTransferBuffer);
}

Control objects you construct like this automatically have transfer enabled (except for button, group box, and static control objects). To explicitly exclude a control from the transfer mechanism, call its DisableTransfer member function after constructing it.

See Also