C++ Builder and Pushpins

Anonymous
04-19-2004, 05:39 AM
I have managed to get C++ Builder to place and delete pushpins but I cannot get it to attach a Name or a Note.

The FindPushpin() doesn't seem to do anything.
The set_Name() doesn't appear to do anything.
The set_Note() doesn't appear to do anything.

Has anyone managed to get any of these to work in C++ Builder??.

:?

Winwaed
04-19-2004, 08:17 AM
Doesn't the method that adds a pushpin, also include a parameter for the name?


Richard

Anonymous
04-19-2004, 11:21 AM
Richard,
Thanks for the response - I have tried several times to get information on this problem.

You are correct but it doesn't work with the Borland. Any suggestions would be very welcome.

Basically what I want to do is place a pushpin with a name or a note and when a new location is required delete the old one and place a new one.

I can place them and delete them but can't get the name or note attached.

Winwaed
04-19-2004, 02:20 PM
Trevor: I'm afraid I don't use C++ Builder, but I still avoid MFC by using Visual Studio with the Intel C++ compiler. I wrote the following article which I checked by someone with C++ Builder, and includes a little bit of information at the end for C++ Builder users:

http://mp2kmag.com/a106--c++.without.mfc.mappoint.html

You might be doing that already, though?


Richard

Anonymous
04-20-2004, 03:59 AM
Thanks Richard,

I have read your article but I am not experienced enough to understand it.

It would appear that the C++ Builder doesn't implement the Microsoft OCX properly - I may have to abandon it but that would be giving up.

Somebody out there has the answer.

I will however keep trying until I crack this one

Thanks again

Anonymous
04-30-2004, 11:13 PM
You're right, it's not implemented properly. There's many things that work with VB, but not CBuilder. You've just come across one of them.

Our solution to almost all such problems was to use Visual Basic to create a simple ActiveX wrapper for the MapPoint OCX. This wrapped control is what is used in Builder. When things like setting the name don't work directly, we add a simple Get/Set routine to the VB project and do it there.

Basically, Visual Basic acts as an interface to make those handful of calls that fail in Builder directly.

Cheers,
Chris
VP Sales & Marketing
www.mobileiq.biz

tanguy_laverdure
05-25-2004, 03:56 AM
Hi,

It works fine with C++ builder v6. You can add separatly a name and/or a note to a pushpin

WideString wsPushPinInfo = asUnNumeroClient.c_str();
WideString wsRaisonSociale = asRaisonSociale.c_str();
Mappoint_tlb::Pushpin *pPushpin;
pPushpin = _pMap->AddPushpin(pLocation,wsPushPinInfo.c_bstr());
pPushpin->set_Note(wsRaisonSociale.c_bstr());
pPushpin->set_BalloonState(0);
pPushpin->set_Highlight(false);
pPushpin->set_Symbol(iiSymbole);

cu,

 
Web mp2kmag.com
mapforums.com