I am writing an MFC application that uses the MS Mappoint OCX. I need to display the location of people and vehicles on a map, and the best way to do this is with Pushpin objects. I have no problem displaying the bracket button icon with some text, but you want to change the icon to a specially designed one. From a limited amount of Mappoint programming information, there appears a way to do this, to create a symbol object from a symbol object, and then assign it to a pushpin like this.
CSymbols symbols;
CSymbol symbol;
symbol=symbols.Add("c:/temp/myicon.ico");
pushpin.put_Symbol(symbol.get_ID());
But the program crashes with an unhandled exception in the symbol.add command.
Can someone tell me what I'm doing wrong here? or am I completely mistaken?
thank you for your time
Jan
source
share