C++ Builder and Mappoint Pushpins Problem

Please support our C++ advertiser: Intel Parallel Studio Home
Closed Thread

Join Date: Apr 2004
Posts: 2
Reputation: Trevor@Taran is an unknown quantity at this point 
Solved Threads: 0
Trevor@Taran Trevor@Taran is offline Offline
Newbie Poster

C++ Builder and Mappoint Pushpins Problem

 
0
  #1
Apr 20th, 2004
I am trying to get the Microsoft Mappoint OCX working in C++ Builder 6.0 Pro.

So far I can place pushpins and delete them but I cannot attach a name or note.

When the compiler is in Debug mode the code will compile without any error but crashes when running Mappoint related code.

It reports - Debugger Exception Notification

Project MapTest2.exe raised exceptionclas EAccessViolation with message 'Access violationat address 00401DD3 in module 'MapTest2.exe.
Reda of address 00000000'. Process stopped. Use Step or Run to continue.

It would appear that the C++ cannot handle the Microsoft Mappoint OCX properly - all suggestions welcome.

When the complier is in Release mode the code works.


:rolleyes:
Last edited by Trevor@Taran; Apr 20th, 2004 at 5:48 am. Reason: additional information added
Quick reply to this message  
Join Date: Jul 2004
Posts: 1
Reputation: comtecworks is an unknown quantity at this point 
Solved Threads: 0
comtecworks comtecworks is offline Offline
Newbie Poster

Re: C++ Builder and Mappoint Pushpins Problem

 
0
  #2
Jul 27th, 2004
Hello Trevor!

I am trying the same thing with CB5 but it only works to add a pushpin - not to delete them. Can you tell me how you've been able to delete all the pushpins you've made in your program???

Here is a sample code how I make pushpins in my Application including a note and a symbol:

void __fastcall TForm1::AddPin( double Lat, double Lon, AnsiString
Truck, AnsiString Note )
{
WideString txt;
PushpinPtr pin;
LocationPtr loc;

loc = Map->GetLocation( Lat, Lon, 100 );

txt = Truck;
pin = Map->AddPushpin( loc, txt );

pin->set_BalloonState( geoDisplayName );
pin->set_Symbol( 85 );
pin->set_Highlight( true );
txt = Note;
pin->set_Note( txt );

pin->MoveTo( TruckSet );

delete pin;
delete loc;
}

Hope you can help me!

Thanks in Advance,

Michi
Quick reply to this message  
Join Date: Apr 2004
Posts: 2
Reputation: Trevor@Taran is an unknown quantity at this point 
Solved Threads: 0
Trevor@Taran Trevor@Taran is offline Offline
Newbie Poster

Re: C++ Builder and Mappoint Pushpins Problem

 
0
  #3
Aug 3rd, 2004
Hi Michi,

I have already posted a reply in the private messages forum but the following is more or less what I said.

I have a solution to interfacing Borland Builder and Mappoint but I am using it in a tracking system. Can you tell me what you are using it for - ie are you a competitor??.

Deleting a pin is as simple as pin->delete but you will have many more hurtles to get over before you get it all working the way you want it. Email me and I will sned you a CD with our software on it (no source) then you can see what I have done.


Regards,
Trevor






Originally Posted by comtecworks
Hello Trevor!

I am trying the same thing with CB5 but it only works to add a pushpin - not to delete them. Can you tell me how you've been able to delete all the pushpins you've made in your program???

Here is a sample code how I make pushpins in my Application including a note and a symbol:

void __fastcall TForm1::AddPin( double Lat, double Lon, AnsiString
Truck, AnsiString Note )
{
WideString txt;
PushpinPtr pin;
LocationPtr loc;

loc = Map->GetLocation( Lat, Lon, 100 );

txt = Truck;
pin = Map->AddPushpin( loc, txt );

pin->set_BalloonState( geoDisplayName );
pin->set_Symbol( 85 );
pin->set_Highlight( true );
txt = Note;
pin->set_Note( txt );

pin->MoveTo( TruckSet );

delete pin;
delete loc;
}

Hope you can help me!

Thanks in Advance,

Michi
Quick reply to this message  
Closed Thread

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC