MAPX Triple Development 3 with VC ------ Using Mapx Tools Writer: Bluedy Er- Huang@163.com There is generally a toolbar for a "standard" Windows application. If you have used a GIS system, you must use the tools on the toolbar. The tool on the toolbar provides us with a shortcut to quickly call a feature. Let's create a MAPX toolbar. What is the first function? Let's imitate MapInfo: Zoom tool, reduce the tool. To enlarge the image, what algorithm is used? Don't worry! We are in secondary development, the implementation of these algorithms, Mapx has, and we only need to call its function. More absolutely, Mapx has built a common "tool". The enlargement tool is Mizoomintool, and the tool is MizoomoutTool. How can I use it? It is said that the CMAPX class has a CurrentTool function, "the name" attribute, the name of the function "------ current tool, call it. Remember the front ------ Get and SET, now you don't need "get", and "setting", then the function of the call is: m_ctrlmapx.setcurrentTool (Mizoomintool); // Enlarge Tool M_Ctrlmapx.setCurrentTool (MizoomouthTool); / / Reduce Tool
As for the implementation of the program, add a message processing function for the button's button, and add the above code to the function body. Running, look at the effect. Simple? It's that simple. Others say that VB is simple to develop simple, what do you say? MapX built-in tools: miArrowTool; miPanTool; miCenterTool; miZoomInTool; miZoomOutTool; miSymbolTool; miTextTool; miSelectTool; miRadiusSelectTool; miRectSelectTool; miPolygonSelectTool; miLabelTool; miAddLineTool; miAddPolylineTool; miAddRegionTool; miAddPointTool;