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.