943,525 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 5315
  • C++ RSS
Apr 20th, 2004
0

C++ Builder and Mappoint Pushpins Problem

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Trevor@Taran is offline Offline
2 posts
since Apr 2004
Jul 27th, 2004
0

Re: C++ Builder and Mappoint Pushpins Problem

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
comtecworks is offline Offline
1 posts
since Jul 2004
Aug 3rd, 2004
0

Re: C++ Builder and Mappoint Pushpins Problem

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






Quote 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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Trevor@Taran is offline Offline
2 posts
since Apr 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
This thread is currently closed and is not accepting any new replies.
Previous Thread in C++ Forum Timeline: Running a program
Next Thread in C++ Forum Timeline: RAW Packet Forwarding





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC