Getting and Setting Container Properties

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:

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.

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Container and Automation C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.