OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Changing Control Attributes

All control objects get the default window styles WS_CHILD, WS_VISIBLE, WS_GROUP, and WS_TABSTOP.

If you want to change a control's style, you manipulate its Attr.Style. Each control type also has other styles that define its particular properties.

Each control object inherits certain window styles from its base classes. You should rarely assign a value to Attr.Style. Instead, you should use the bitwise assignment operators (|= and &=) to mask in or mask out the window style you want. For example:

// mask in the WS_BORDER window style
Attr.Style |= WS_BORDER;
// mask out the WS_VSCROLL style
Attr.Style &= ~WS_VSCROLL;

Using the bitwise assignment operators helps ensure that you do not inadvertently remove a style.

See Also