Knowledge Base



KB10412 - Using DK.ActiveX with Visual C++, how to set up the shape layer parameters.

Setting up the shape layer parameters in VB looks like the following:

 Set ll = New XGIS_LayerSHP
 ll.Path = GisUtils.GisSamplesDataDir + "rivers.shp"
 ll.Name = "rivers"
 ll.UseConfig = False
 ll.Params.Line.OutlineWidth = 0
 ll.Params.Line.Width = 3
 ll.Params.Line.Color = RGB(0, 0, 255)
 GIS.Add ll


In VC++, type conversion is required. To set up the cast to the proper types, do the following:

CXGIS_LayerVector *ll;
  CXGIS_ParamsSectionVector *params;
  CXGIS_ParamsLine *line;
  params = (CXGIS_ParamsSectionVector *) ll->get_Params();
  line = (CXGIS_ParamsLine *) params->get_Line();
  line->put_Color(0);
Created: June 30, 2004, Modified: July 27, 2015