About Me

My photo
I'm a C# developer and that takes up most of my time but when I'm not in front of the computer, I do a lot of mountain biking, skiing and spending time with my dog. When I'm not doing any of that stuff, I'm spending time with my lovely wife.

Tuesday, November 25, 2008

Mappoint 2009 Optimize Routes with Dialog

Well I've been trying for about a day now to get mappoint 2009 to optimize a route with the dialog box. It worked fine for <= 2006 with this call :
SendMessage(FindWindow(null, "Map - Microsoft MapPoint North America"), WM_COMMAND, 35388, 0);

after some Spy++ investigational work, i found that this is what needs to be sent in mappoint 2009:

SendMessage(FindWindow(null, "Map - Microsoft MapPoint North America"), WM_COMMAND, 35221, 0);

So there you have it. I hope this helps.

2 comments:

Anonymous said...

I think a lot of the windows messages have changed, a couple of the articles on MP2K Magazine probably need to be updated. Would you be willing to write a "how to" and post on Map Forums or MP2Kmag?

//Rob said...

I have no problems with that. Is there a specific thread that it would fit best?