OWLNext 7.0
Borland's Object Windows Library for the modern age
|
TCheckBox and TRadioButton each has a constructor that takes the seven parameters commonly found in a control object constructor (a parent window, a resource identifier, the control's x, y, h, and w dimensions, and an optional module pointer).
They also take a text string and a pointer to a group box object that groups the selection boxes. If the group box object pointer is zero, the selection box is not part of a group box. Here are one each of their constructors:
The following listing shows some typical constructor calls for selection boxes.
Check boxes by default have the BS_AUTOCHECKBOX style, which means that Windows handles a click on the check box by toggling the check box. Without BS_AUTOCHECKBOX, you would have to set the check box's state manually. Radio buttons by default have the BS_AUTORADIOBUTTON style, which means that Windows handles a click on the radio button by checking the radio button and unchecking the other radio buttons in the group. Without BS_AUTORADIOBUTTON, you would have to intercept the radio button's notification messages and do this work yourself.