Hello,
Just a few days a purchased an update of Fivewin in order to add GIS functionality to my program. The ActiveX component in questiopn is MapObjects. Most of the code seems to work fine (including events), but at one point I have no clue how to proceed. Please review the code below.
Regards,
Stephan
FUNCTION GIS()
LOCAL oWnd, oWndChild, oMap
LOCAL cEvents := ""
LOCAL oLayer, hLayers, nLayers
LOCAL hItem
DEFINE WINDOW oWndChild MDICHILD OF oWndMain()
oMap = TActiveX():New(oWndChild, "MapObjectsLT2.Map.1")
oMap:SetProp("Appearance", 1) // 3D
oMap:SetProp("ScrollBars", 1) // TRUE
oLayer := CreateObject("MapObjectsLT2.MapLayer")
oLayer:File := "d:\synbiosys\kaarten\prov2002.shp"
hLayers := oMap:GetProp("Layers")
// nLayers := OleGetProperty(hLayers, "Count")
// now we need to add the layer objects to the layers collection.
// using a VB-alike syntax it would be like 'oMap:Layers:Add(oLayer)'
// There is handle to the layers collection, hLayer, but how to add a layer
// to the layers collection????
oWndChild:oClient := oMap
oWndChild:Resize()
oWndChild:bResized := {|| oMap:Do("Refresh") }
oWndChild:bValid := {|| oMap:End(), oMap := NIL, TRUE }
RETURN(NIL)