OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Manipulating Controls

One way dialog boxes manipulate their controls is by sending them messages using member functions inherited from TWindow, with a control message like LB_ADDSTRING.

Control objects greatly simplify this process by providing member functions that send control messages for you.

TListBox::AddString(), for example, takes a string as its parameter and adds it to the list box by calling the list box object's HandleMessage member function:

int TListBox::AddString(const char far* str)
{
return (int)HandleMessage(LB_ADDSTRING, 0, (LPARAM)str);
}

This example shows how you can call the control objects' member functions via a pointer:

ListBox1->AddString("Atlantic City");
//ListBox1 is a TListBox *

See Also