Click here to Skip to main content
15,888,221 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi everyone, hope I'm not wasting anyone's time...

I am trying to develop a desktop application using VS2008 C++/MFC, based on MapWinGis.ocx control (http://www.mapwindow.org). All I'm asking someone experienced is only CONCEPT for classes or some cast trick and I can send some code if needed. I want to use (but not necessarily) document/view architecture.

So, I made a wrapper class for map control (like any other .ocx), declared m_Map in my mapDoc.h file,in mapView onCreate and onSize I Create and put map over the client area and is working as it should. Now, I want another view for LegendView. Ok, base class for LegendView must be CxxView, I would like it to be TreeView. And another view for PreviewView, which is showing MaxExtended map.

I did try to make another DocumentTemplate (for PreviewView), but how can I extract data using GetDocument() from m_Map(in Doc.h) for MainView and PreviewView using same instance of m_Map? Should I make pointers to map type pointing to same instance in Doc file in every of the views? When something is changed in the map control, how to update it to all views with updateAllViews? Nothing I try seems to work. Is Doc/View architecture the right concept with .OCX in the core? Is it possible to make docking windows in doc/view?

OK, how would you start doing such a project? I've been doing it for some time now and I'm out of my mind.
Posted
Updated 8-Jun-10 9:44am
v2

1 solution

Hi Siouxarba,

I don't have an answer, unfortunately, but wondered if you could post some example code, as I'm trying to create a dialog based application to just display a Shapefile (using a "Load" button). I'm having an issue creating the map class.

I'm getting frustrated and going out of my mind as well... Hope you were able to find an answer to your question.

Thanks in advance,

Frank
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900