IShapefile *isf;
CLSID clsid_shapfile;
HRESULT hresult1= CLSIDFromProgID(L"MapWinGIS.Shapefile", &clsid_shapfile);
if(FAILED(hresult1))
return;
CoCreateInstance(clsid_shapfile, NULL, CLSCTX_INPROC_SERVER, __uuidof(IShapefile), (void**)&isf);
String str = "D:\\winmapgis\\TM_WORLD_BORDERS-0.3.shp";
BSTR wstr = (BSTR)WideString(str);
isf->Open(wstr,NULL);
mp1->RemoveAllLayers();
long handle1 = mp1->AddLayer(isf,true);
mp1->ZoomToLayer(handle1);
uj5u.com熱心網友回復:
其他的呼叫同理啊轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/67641.html
上一篇:gcc常見編譯錯誤整理
