Containers are WC_CONTAINER class windows that have the following CCS_container
styles and selection types. Container control styles and selection types
are specified when the container control is created.
Container Control Styles
The following list defines container style bits that your application can
use. These style bits must be set by your application.
CCS_AUTOPOSITION
Automatic positioning, which causes
container items displayed in the icon view to be arranged when any of the
following occur:
- The window size changes
- Container items are inserted, removed, sorted, invalidated,
or filtered
- The font or font size changes
- The window title text changes.
In
all of these cases, container items are arranged the same as when the CM_ARRANGE
message is sent. The CCS_AUTOPOSITION style bit is valid only when it is
used with the icon view (CV_ICON).
CCS_MINIRECORDCORE
A record style bit that causes the container to
interpret all container records as being smaller than they would otherwise
be. If a CM_ALLOCRECORD message
is received, all records are interpreted and allocated according to the
information in the MINIRECORDCORE
data structure instead of the RECORDCORE
data structure, which is used if this style bit is not specified.
CCS_READONLY
A read-only style bit for an entire container, which
prevents a user from editing any of the text in a container window. If you
do not set this style bit, a user can edit any of the text in a container
window unless you set the following read-only attributes in the appropriate
data structures:
CA_TITLEREADONLY
Sets the container title to read-only.
This is an attribute of the CNRINFO
data structure's flWindowAttr field.
CRA_RECORDREADONLY
Sets text fields in records to read-only. This
is an attribute of the RECORDCORE
and MINIRECORDCORE data structures'
flRecordAttr field.
Note: If the CCS_MINIRECORDCORE style bit is specified when a container
is created, the MINIRECORDCORE should
be used instead of RECORDCORE and
PMINIRECORDCORE should be used instead of PRECORDCORE in all applicable
data structures and messages.
CFA_FIREADONLY
Sets column
data to read-only. This is an attribute of the FIELDINFO
data structure's flData field.
CFA_FITITLEREADONLY
Sets column headings to read-only. This is an attribute
of the FIELDINFO data structure's
flTitle field.
CCS_VERIFYPOINTERS
A pointer verification style bit, which verifies
that the application pointers are members of the container's linked list
before they are used. If it is not set, the container does not verify the
pointers.
Notes:
- The CCS_VERIFYPOINTERS style bit does not verify
the validity of a pointer. It only verifies whether a pointer is a member
of a container's linked list.
- After your code has been developed and tested,
you may want to remove the CCS_VERIFYPOINTERS style bit in order to improve
the container's performance. Otherwise, the container will attempt to verify
all pointers, which will slow its response to actions that users perform.
Container Control Selection Types
If a selection type is not specified, single selection is the default. For
the tree view, single selection is the only type supported. Refer to the
description of the selection types in the SAA CUA Advanced Interface
Design Reference for more information.
CCS_SINGLESEL
Single selection, which allows a user
to select only one container item at a time. Each time a user selects a
container item, the selection of any other container item is cancelled.
CCS_EXTENDSEL
Extended selection,
which allows a user to select one or more container items. A user can select
one item, a range of items, or multiple ranges of items.
CCS_MULTIPLESEL
Multiple selection, which allows a user to select
zero or more container items.
[Back]
[Next]