Map Extents

Jun 6, 2011 at 8:43 PM

Version: MapWinGIS v4.8.2
OS: Win7
Development Environment: Visual Studio 2008 Pro
Language: Visual C++ (MFC)

When I try to access the Extents object from my Map object, there is nothing that I see related to Extents that is available.

If I create a sample application in Visual C#, and add a map, I AM able to access the Extents object from the Map object.

Has anyone else ran into an issue getting access to Extents from the map object? 

I've looked in the wrapper class that I had to generated (using the Add Class... MFC Class From ActiveX Control... selecting _DMap).  There are only a few member functions that have Extents in them, but nothing that indicates that an Extents object would be available.

Can someone please assist???

Jun 7, 2011 at 7:47 AM

Hi Frank,

We had problems too before when generating the wrapper class, When we are selecting the DMap object it generates only part of the properties. The solution we found is (not elegant) generating a class selecting another object :

We didn't dig deep in this problem but we had the properties that worked

-Right click on the map control

-select Add Variable

- In the category select Backcolor or anything except control

-Put a dummy variable name

-Select the .h file created for the class DMap.h and DMap.cpp

-select finish

this will complete the file with enumerations, properties and lot of stuff...

I am sure that there is a better way to do this, if anyone else has a solution...


I think that this will solve your problem concerning the mapcursor : MapWinGIS v4.8.2 - How to set the Map's Cursor Mode in code?

Dec 2, 2011 at 7:51 AM
Edited Dec 2, 2011 at 7:52 AM

Hi Pierre,

I have the same problem with FrankEB. I am a novice, and I couldn't follow the Pierre31's method because after right click on the map control,   I can't find the Add Variable item.

Could you give me much more help?  Thanks.