This project is read-only.

about mwsoc:new symbology for MapWinGis

Feb 2, 2011 at 11:25 AM

Hi,

i've read this post in old forum

http://www.mapwindow.org/phorum/read.php?5,18067,page=1

anybody knows how to use this modification?I need the latest ocx?

Thanks!

Feb 3, 2011 at 9:25 PM

Yes, I think the latest ocx is needed. For some time we compiled ocx in 2 versions: with old and new symbology. The latest binary on this site is compiled with new symbology.

Currently I removed the compilation switch and there will be only one version. But I haven't commited the code yet. 

Generally there are 2 ways to work with symbology:

1. Old one which use set of Map.ShapeLayer... and Map.Shape... properties. For example ,Map.ShapeLayerFillColor or Map.ShapeFileColor(ShapeIndex).

2. New one which relies upon categories (Shapefile.Categories).

In the new version of ocx Map.ShapeDrawingMethod will be used to toggle between those 2 modes. Map.ShapeDrawingMethod = dmNewSymbology will be used to work with new categories. And it will be the default one.

New charts and labels will be accessible in both modes.

Regards,

Sergei

Feb 4, 2011 at 9:24 AM

Hi Sergei,

in other posts i explain the problem of updating ocx in a vs2008 project just created...is it possible to open a post with a tutorial on how to update ocx?

It will be good for people!

Thanks a lot!

Feb 4, 2011 at 10:14 AM

Seum,

I believe some info about updating of interop assemblies is here:

http://mapwingis.codeplex.com/SourceControl/changeset/view/57237#838857

In case you have particular compilation problems, post them and I'll try to help.

Regards,

Sergei

Feb 4, 2011 at 1:38 PM

I've downloaded the latest ocx in this website.

I've a vc++ project where i'm working...i want to update the ocx...

i've tried to unregister the ocx present in the installation folder (..\Common Files\MapWindow); then i substitute the old with new downloaded ocx

i follow the instruction in the link posted before, downloading the vc++ project to rebuild the other dlls, but it failed...

what's wrong?

Feb 5, 2011 at 12:42 AM

In case you have just to rebuild interop assemblies (update version), there is no need to rebuild source by yourself.

Just register the new ocx from you downloaded and follow the other instructions.

As for compilation problems: to say 'failed' isn't enough. What exact errors do you have?

Feb 7, 2011 at 2:38 PM

i've registered the new ocx and i rebuild my project, but it seems to be the same as before...

and you see that in the link above, other instruction tells to rebuild the MapWinGis project...that is, I suppose, not my project but the ocx project...

so, how can i use the new ocx?i need step-by step indications (i know...i'm a very horrible programmer...)

Thanks

 

Feb 7, 2011 at 2:56 PM

i've retried to update ocx in following steps:

- delete the old ocx from the folder Program Files/Common Files/ MApWindow

- copy the new ocx in the folder above

- click on regMapWinGis.cmd file, in which there are the following instructions:

    cd %cd%
regsvr32 /u /s MapWinGIS.ocx
regsvr32 /s MapWinGIS.ocx

- as mentioned here( http://mapwingis.codeplex.com/SourceControl/changeset/view/57237#838857), i have opened a new vc++ project

- when i add a mapWindow control from toolbox to form i have this error:

Failed to create component AxHost. The error message follows:

... could not add an ActiveX reference to type library...because it's not registered or does not exist on disk...

 

??Any suggestion about??

Feb 8, 2011 at 1:20 AM

Try to call regsvr32 from the command line without silent mode, and see whether registration/unregistration happen indeed.

Feb 8, 2011 at 3:08 PM

You're right!

The regsvr32 /u doesn't work...what have i do now?

Feb 8, 2011 at 3:49 PM

i've resolved the unregistration problem: it depends on administrator rights...vwindows vista :P

ok, now i have unregistered the ocx, then i substitute it with the newest and i try to register, but it fails with this error:

impossible to load "MapWinGIS.ocx" module

..

impossible to find specified module

 

Notice that i've tried to do unregister and register the old ocx, and all works...maybe there are some dependencies to change??

Please help!!!

Thanks

Feb 8, 2011 at 4:13 PM

Use Dependency Walker, then ;)

Feb 8, 2011 at 4:25 PM

Yes!I've resolved the problem!!!

In other discussion here () i've read the dependencies and i see that it needs xerces_3 and not xerces_3.0!!!!

Now i have updated my ocx to newest version...and i have followed the instruction to have the new dlls (Interop and AxInterop, version 4.8)

But, in my project, are linked the previous dlls (version 4.7), and if i try to delete from Interop folder on my project, they are rebuilded...

So, now how can i use the new dlls???

Feb 8, 2011 at 4:44 PM

I hope that i don't restart my project ex novo!!!

Please help!!

Feb 9, 2011 at 9:40 AM

The problem is that i cannot recreate a new project with old forms...and the old project builds always the 4.7 dlls..

anyone can help me?

Thanks a lot guys...

Feb 9, 2011 at 11:01 AM

It appears to be a problem after all. 

1. Look at the references to AxInterop and Interop dlls at your project (to what path they lead).

2. Update the dll at this particular path (with the new ones you have).

3. Optional: delete the old dlls in any other locations in your project. Be aware of the CopyLocal property of the references.

4. Rebuild the project.   // it should be working 

 

The full sequence of actions using only your project (in case nothing helps; better to make a copy of project before start):

1. Delete the control from the form.

2. Delete the references to the interops.

3. Delete the control from the toolbox.

4. Save and close the project.

5. Delete any AxInterop and Interop dlls for MapWinGis you have on your PC.

6. Open the project.

7. Add map component to the toolbox.

8. Add map control to the form.  // references and and dlls should be created here

9. Build the project      // probably make some fixes in case some changes were made; you can ask about it here

10. Have fun.

Feb 9, 2011 at 11:28 AM

i've done this steps:

in the properties->common properties of the project, i've added the two 4.8 dlls (axInterop and Interop), and i've deleted the old reference to 4.7 ocx

I've rebuild the project and it works as before the updating...

the only difference is that, in the Interop folder inside my project, there is only the interop dll, AxInterop is missing...

So, what's going on?Can i verify that all works well and i continue straight or there is something to change also?

 

Feb 9, 2011 at 12:41 PM

i noticed that if i write "MapWinGIS::" i have no more items (only tkChartValuesStyle and _DMapEvents)

maybe there is a lot of problems now...

Mar 22, 2011 at 4:09 PM

sorry but i have to reopen this post.

i need to know from sleschinski about its last post...:

It appears to be a problem after all. 

1. Look at the references to AxInterop and Interop dlls at your project (to what path they lead).

2. Update the dll at this particular path (with the new ones you have).

3. Optional: delete the old dlls in any other locations in your project. Be aware of the CopyLocal property of the references.

4. Rebuild the project.   // it should be working 

 

The full sequence of actions using only your project (in case nothing helps; better to make a copy of project before start):

1. Delete the control from the form.

2. Delete the references to the interops.

3. Delete the control from the toolbox.

4. Save and close the project.

5. Delete any AxInterop and Interop dlls for MapWinGis you have on your PC.

6. Open the project.

7. Add map component to the toolbox.

8. Add map control to the form.  // references and and dlls should be created here

9. Build the project      // probably make some fixes in case some changes were made; you can ask about it here

10. Have fun.

 

 

 

can you explain me well about the full sequence using only my project??

thanks

Mar 22, 2011 at 9:45 PM

Seum, what steps have you done from those listed above? 

Mar 23, 2011 at 1:21 AM
Edited Mar 23, 2011 at 1:33 AM

If you experiencing the problem with ocx registration, you can use third party tools, one of them: http://www.chestysoft.com/dllregsvr/default.asp  just follow the instructions.

One more utility: http://www.foxprogramming.co.uk/freetools.html 

Also come across with another interesting issue: on Windows 7 64bit, check UAC status, it should be  disabled, also you have to use long ocx path when you register it, otherwise it will not be registered.

Mar 23, 2011 at 9:37 AM

now i'm at starting point: i have mapwingis ocx 4.7 installed on my winVista machine;

i want to use the 4.8 in my project (built with 4.7); what i have to do?

last time i tried, i update the ocx, i create a new project and add a map control on it to build the libraries and then i've used it in my old project, but i have problems listed in previous post...

so, is there a way to do simply the upgrade?

Mar 23, 2011 at 10:53 AM

i answer myself...YES!

i've used one of the tools of IgorKl to unregister old ocx and register the newer; then, i've created a new vc++ project and i've add the map control on it and build...it creates the two new dlls.

After that, i've linked my old project (in project properties) to axinterop4.8 new dll , and not the ocx as i've done in other times...that's good!

Now i have my project with 4.8 new features!!!

Thanks all for your support! I hope it helps to people who wanted to update the ocx!!