Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 7 of 7

C++ Builder and Pushpins

This is a discussion on C++ Builder and Pushpins within the MapPoint Desktop Discussion forums, part of the Map Forums category; I have managed to get C++ Builder to place and delete pushpins but I cannot get it to attach a ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    C++ Builder and Pushpins

    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??.


  2. #2
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60
    Doesn't the method that adds a pushpin, also include a parameter for the name?


    Richard
    Winwaed Software Technology LLC
    http://www.winwaed.com
    See http://www.mapping-tools.com for MapPoint Tools

  3. #3
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    C++ Builder + Pushpins

    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.

  4. #4
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60
    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
    Winwaed Software Technology LLC
    http://www.winwaed.com
    See http://www.mapping-tools.com for MapPoint Tools

  5. #5
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    C++ Builder and Pushpins

    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

  6. #6
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    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

  7. #7
    tanguy_laverdure is offline Junior Member Yellow Belt
    Join Date
    Dec 2003
    Posts
    17

    C++ builder v6 and pushpin

    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,

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. using c++builder with mappoint
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 07-21-2004, 04:20 AM
  2. how to creat an Excel worksheet with C++Builder 5
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 04-17-2004, 04:10 PM
  3. Borland C++ Builder and Pushpins
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 04-05-2004, 05:15 AM
  4. Borland C++ Builder Pushpins Problem
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 03-30-2004, 07:48 AM
  5. Using MapPoint with C++Builder
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 5
    Last Post: 09-02-2003, 05:37 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96