L_AutSetVectorProperty

#include "ltaut.h"

L_LTAUT_API L_INT  L_AutSetVectorProperty(pAutomation, pProps);

pAUTOMATIONHANDLE pAutomation;

/* pointer to an automation handle */

const pAUTOMATIONVECTORPROPERTIES pProps;

/* pointer to a structure */

Sets the vector automation properties.

Parameter

Description

pAutomation

Pointer to an automation handle.

pProps

Pointer to an AUTOMATIONVECTORPROPERTIES structure that contains the new vector automation properties to set.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Note:

This function is only available in the vector toolkits.

The properties set by this function include pen, brush and font properties used when drawing new vector objects in the automation container.

Required DLLs and Libraries

LTAUT

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions:

L_AutGetVectorProperty

Topics:

Working with Objects within an Automation Container

Example

This example will set a new pen color.

 L_INT AutSetVectorPropertyExample(pAUTOMATIONHANDLE  pAutomation,
                                                  COLORREF           Clr)
{
   L_INT nRet;
   AUTOMATIONVECTORPROPERTIES Props;   /* properties */

   ZeroMemory( &Props, sizeof( Props ) );
   Props.nSize    = sizeof( Props );
   Props.dwMask   = AUTOMATION_VECTOR_PEN;

   nRet = L_AutGetVectorProperty( pAutomation, &Props );
   if(nRet != SUCCESS)
      return nRet;

   Props.Pen.bExtPen                   = FALSE;
   Props.Pen.NewPen.LogPen.lopnColor   = Clr;
   nRet = L_AutSetVectorProperty(pAutomation, &Props );
   if(nRet != SUCCESS)
      return nRet;
   return SUCCESS;
}