LAutomation::SetVectorProperty

#include "ltwrappr.h"

L_INT LAutomation::SetVectorProperty(pAutomationVectorProperties);

const pAUTOMATIONVECTORPROPERTIES  pAutomationVectorProperties;

/* pointer to a structure */

Sets the vector automation properties. This function is only available in the Vector toolkits.

Parameter

Description

pAutomationVectorProperties

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

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:

LAutomation::GetVectorProperty

Topics:

Working with Objects within an Automation Container

Example

This example allows the user to set the default color (RED) when using automation to create vector objects.

L_INT LAutomation_SetVectorPropertyExample(LAutomation &Automation) 
{
   L_INT nRet;
   AUTOMATIONVECTORPROPERTIES AutVecProps;
   //Get current automation PEN properties
   AutVecProps.nSize = sizeof(AUTOMATIONVECTORPROPERTIES);
   AutVecProps.dwMask = AUTOMATION_VECTOR_PEN;
   nRet = Automation.GetVectorProperty(&AutVecProps);  
   if(nRet != SUCCESS)
      return nRet;
   AutVecProps.Pen.bExtPen = FALSE;
   AutVecProps.Pen.NewPen.LogPen.lopnColor = RGB(255,0,0);
   nRet = Automation.SetVectorProperty(&AutVecProps);  
   if(nRet != SUCCESS)
      return nRet;
   return SUCCESS;
}