You can use the API with the OCX. I tested using our OCX vector MFC demo as follows:
1. Add the following lines for the Header and LIB files:
#define _LTERR_H_ //exclude the API error codes
#include <l_bitmap.h>
#pragma comment (lib, "lvkrn_n.lib") //use lvkrn_E.lib with the Evaluation edition
2. The code will be like this:
//m_LEADVector1 is of type CLEADVector
pVECTORHANDLE pVectorHandle = pVECTORHANDLE(m_LEADVector1.GetVector());
// pObject is of type (CLEADVectorObject*), which is the object we want to change
pVECTOROBJECT pVectorObject = pVECTOROBJECT(pObject->GetHObject());
VECTORBRUSH vecBrush;
int n = L_VecGetObjectAttributes(pVectorHandle, pVectorObject, NULL, NULL, &vecBrush, NULL);
vecBrush.VectorBrushStyle = VECTORBRUSH_GRADIENT;
vecBrush.BrushType.GradientBrush.crStartColor = RGB(255, 120, 255);
vecBrush.BrushType.GradientBrush.crEndColor = RGB(70, 255, 120);
vecBrush.BrushType.GradientBrush.uGradientSteps = 255;
vecBrush.BrushType.GradientBrush.GradientStyle = GRADIENT_CONE_FROM_LB;
n=L_VecSetObjectAttributes(pVectorHandle, pVectorObject, NULL, NULL, &vecBrush, NULL, 0);
Amin Dodin
Senior Support Engineer
LEAD Technologies, Inc.