|Tool with Modeless Dialog
This sample illustrates how you can create a tool with a modeless dialog that stays on top when you interact with the ArcMap window.
Using the tool, you select a polygon feature. The tool's dialog graphs the field values of the features within a certain distance of the feature you selected first. The dialog has options for modifying the fields graphed, and the buffer distance.
This sample used 'AtlControls.h' from the Microsoft ATL sample 'ATLCON' in order to facilitate working with
controls without MFC. This header file provides thin wrappers for windows controls, so that the user
experience is almost the same as when working with MFC controls.
How to use:
Goto www.microsoft.com <http:\\www.microsoft.com>.
Type "atlcontrols" into the search box.
Find the hit ATLControls_h.htm
Copy the code from the page, paste it in a new file and save it as AtlControls.h in this sample's directory.
Compile the sample and use it:
Open this sample's workspace and change the paths to esriCore.olb and ArcCATIDs.h in StdAfx.h so that they point to your ArcGIS installation.
Build this sample's DLL. This will also register the command in the appropriate component category.
Open the Customize dialog. Under the Commands tab, select the 'Graph Surrounding Features' command from the Developer Samples category, and drag it on to a toolbar. Dismiss the Customize dialog.
Click on the tool and select a polygon feature. The modeless dialog comes up with a graph of field values of features within the default buffer distance of the feature you just selected.
In the dialog, modify the 'Graph Field' and the 'Buffer Distance', and select another feature. Continue using the tool. Dismiss the dialog when done.
A polygon feature class added as layer.
||Implementation file for the Graph Dialog.
||Header file for the Graph Dialog.
||Header file that defines thin classes for controls for use with ATL.
From Microsoft's ATLCON sample. Please download this file from the Microsoft
||Implementation file for the Graph Surrounding Features Tool.
||Header file for the Graph Surrounding Features Tool.
||Registry script file for the Graph Surrounding Features Tool.
||Compiled DLL for project.
||Implementation of DLL Exports.
||Module Definition file, listing exported functions.
||The IDL file for the sample.
||Make file for Project.
||Module definition file for proxy-stub Code.
||Make file for proxy-stub code.
||Header file that includes standard system include files.
||Source file that includes just the standard includes.
IDataGraph, IDataGraphProperties, IApplication, IMxDocument, IActiveView, IDocumentEvents, IActiveViewEvents, IEnumDataset, ITable, IDocumentDatasets, ITableFields, IField, IFieldInfo, ICursor, IQueryFilter, ITableSelection, ISelectionSet, IRow, IFeatureLayer, ISpatialFilter, IFeatureSelection, ITopologicalOperator, IDisplayTransformation, IScreenDisplay