Container Metrics
The container possesses many properties that can be modified. These include pen characteristics, brush characteristics, owner window, offset values, scalar values, etc. The ability to modify these characteristics allows the user to fine-tune the container to better meet application specific requirements.
Many characteristics maintained in the CONTAINERMETRICS structure can be changed using the LContainer::SetMetrics function. These include:
The color of the pen used to draw objects in the container.
The dimensions of the handle used to edit the objects in the container.
The color of the pen used to draw the object handles.
Status of the object handles (enabled or disabled).
The boundary of the container.
The font used in the text object.
The palette used to draw different objects in the container.
To determine the current settings for the characteristics described in the CONTAINERMETRICS structure, use the LContainer::GetMetrics function.
Owner window
When a container is created using LContainer::Create, the container is attached to a window. This window becomes the owner of the container. This owner can be changed using the LContainer::SetOwner function. To determine the current owner, use the LContainer::GetOwner function.
Owner Draw Mode
One of the benefits to using the container is the automatic drawing capability it provides. However, this capability can be disabled using the LContainer::SetOwnerDraw function. If the owner draw mode is set to FALSE (default), the container automatically handles drawing in the container. If the owner draw mode is set to TRUE, then the user is responsible for handling all aspects of object drawing within the container. To determine the current state of the owner draw mode for a container, call LContainer::IsOwnerDraw.
Enabled
A container must be enabled in order to edit objects within that container. To determine whether a container is enabled, call LContainer::IsEnabled. To change the current enable status, call LContainer::SetEnabled.
For information on the scaling values, refer to Container Scaling Values.
For more information on the offsets, refer to Container Offsets.