Using Container Objects

After initializing and creating the container, the type of object to draw in the container should be set. This is done using the LContainer::SetObjectType function. For example, the sample below sets the container to draw circles:

lcont.SetObjectType (CONTAINER\_OBJECT\_TYPE\_CIRCLE); 

This function requires a valid container handle and a constant that specifies the type of object to set.

After setting the object type, the container will begin drawing that object whenever the user clicks and drags the mouse over the window that owns the container. To get the current container object type, call LContainer::GetObjectType.

Each object type drawn by a container can have a different mouse cursor associated with it. For example, when a rectangle object is drawn in the container, one cursor is displayed. If a circle object is drawn in the container a different mouse cursor can be displayed. To set the cursor to use for a specific object type drawn by a container, use LContainer::SetObjectCursor.

To determine the cursor set for a specific object type call LContainer::GetObjectCursor.

LContainer::EditObject displays an object described in a CONTAINEROBJECTDATA structure and makes it available to the user for editing.

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

LEADTOOLS Container and Automation C++ Class Library Help