Hey everybody.
I have a little question. I know that what I want to do this can be done with just adding a Tool Add-in but I want to do this from my Docked window.
I have a checkbox and when it is checked I override the OnMouseDown for the docked window but I want to listen to the OnMouseDown in the IMxDocument.
Here is my code so far:
protected override void OnMouseDown(MouseEventArgs e)
{
base.OnMouseDown(e);
if (mapLocation.Checked)
{
System.Windows.Forms.Cursor.Current = Cursors.Arrow;
IMxDocument mDoc = ArcMap.Application.Document as IMxDocument;
IPoint mPoint;
mPoint = mDoc.CurrentLocation;
double lng, lat;
lng = mPoint.X;
lat = mPoint.Y;
MessageBox.Show(lng+", "+lat,"Retrived Map Data");
}
}
So I would like this code to fire when I pressing in the Data View and not in the Dockable Window as it does now.
Thankful for answers.