problem of Using "_DMapPtr"in vs2010

Jul 25, 2012 at 12:36 PM
Edited Jul 25, 2012 at 12:40 PM

I used "MapWinGIS"in my project based on mfc.I wanted to change the cursor mode,so I wrote code like this.

in the stdafx.h,I have written

#import "C:\dev\MapWinGIS\MapWinGIS.ocx"rename("OriginalHeight","OriginalHeightEx")\rename("GetOriginalWidth","GetOriginalWidthEx")\rename("GetOriginalXllCenter","GetOriginalXllCenterEx")\rename("GetOriginalYllCenter","GetOriginalYllCenterEx")

in the function OnCreat() of myview,I wrote code below.

MapWinGIS::_DMapPtr pmap=NULL;



the code above is a part.

However, when I executed the application,an exception occured.I debuged it ,the exception was throwed at the code "pmap->PutCursorMode(MapWinGIS::cmNone);"

Is there anyone would help me?many appreciations!