Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
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 L_ContainerSetObjectType function. For example, the sample below sets the container to draw circles:
L_ContainerSetObjectType (pLeadContainer, 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 L_ContainerGetObjectType.
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 L_ContainerSetObjectCursor.
To determine the cursor set for a specific object type call L_ContainerGetObjectCursor.
L_ContainerEditObject displays an object described in a CONTAINEROBJECTDATA structure and makes it available to the user for editing.