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 6 of 6

Deleting selected objects on the map??

This is a discussion on Deleting selected objects on the map?? within the MapPoint Desktop Discussion forums, part of the Map Forums category; Lagnuage: VC++ 6.0 Version: Mappoint 2006 Type: COM/ActiveX Hello my friends, I think I have a difficult problem here. When ...

  1. #1
    VC_Man is offline Member Green Belt
    Join Date
    Nov 2006
    Posts
    93

    Deleting selected objects on the map??

    Lagnuage: VC++ 6.0
    Version: Mappoint 2006
    Type: COM/ActiveX


    Hello my friends,

    I think I have a difficult problem here.
    When I draw a rectangle on the map, I can select the drawn rectangle and modify its size. But I can also delete it, just by pushin the delete-key on my keyboard. The problem is, how can I see in the code wether I deleted a selection?

    Normally I keep track of the created objects on the map by putting them in a collection. But pressing the delete-key deletes an object without notifying me what happened. Maybe I can use the AfterViewChange event to see something has changed, but I don't know if it works. Also I don't know how to solve this problem. Anybody a suggestion? Thank you.

  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

    Re: Deleting selected objects on the map??

    When you create a shape, you can apply an identifier to it. This is only visible to your program. Then search the shapes to find it. If it is still there, then it hasn't been deleted.

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

  3. #3
    Paul Larson is offline Senior Member Green Belt
    Join Date
    Sep 2005
    Location
    Battle Creek, Michigan
    Posts
    136

    Re: Deleting selected objects on the map??

    You could also check ActiveMap.Shapes.Count before and after the deletion.

  4. #4
    VC_Man is offline Member Green Belt
    Join Date
    Nov 2006
    Posts
    93

    Re: Deleting selected objects on the map??

    Thank you for your replies guys,

    I think the solution of Paul is much easier, because I just check the count at the delete-key message handler. I don't like to do too much coding for just checking the deleted object. But I guess there is no other options, right?

    Btw, is it possible to catch the delete-key message before it arrives to Mappoint? Than I ignore it and force the user to do it accoording my way.

  5. #5
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: Deleting selected objects on the map??

    Hi,

    you can set the form's KeyPreview to true. I did not tryed it but with ActiveX things possible some things are not working as expected. If KeyPreview is true then all key's are trapped by the form and you can null them if nececary.

  6. #6
    VC_Man is offline Member Green Belt
    Join Date
    Nov 2006
    Posts
    93

    Re: Deleting selected objects on the map??

    Ok thank you Willfried,

    I'll look if I can workt it out.
    Thnx guys.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. deleting city names
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 11-04-2004, 07:53 PM
  2. New map (Deleting)
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 07-21-2004, 04:21 AM
  3. How to tell if an objects location is visible?
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 06-28-2004, 09:15 AM
  4. disabling deleting pushpin
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-28-2004, 09:14 AM
  5. Deleting city names - HELP
    By John Riccobono in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-20-2004, 07:10 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