MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




PushPin Selection detection in Delphi?

This is a discussion on PushPin Selection detection in Delphi? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; When the OnSelectionChange event is fired I would like to be able to determine if the NewSelection is a PuchPin ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-16-2003
Junior Member
White Belt
 
Join Date: Dec 2003
Posts: 4
PushPin Selection detection in Delphi?

When the OnSelectionChange event is fired I would like to be able to determine if the NewSelection is a PuchPin Object. Is there a way to figure this out. What I would ultimitely like to do is to display the Street Address in a status bar. I appreciate any help.
__________________
Thanks,
Shad
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 12-17-2003
Member
Yellow Belt
 
Join Date: Feb 2003
Posts: 48
Dont do delphi but...

In VB:
If TypeOf pNewSelection Is Pushpin Then
.......................
end if

OR

If TypeName(pNewSelection) = "Pushpin" then
.....................
end if


M.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 12-18-2003
Junior Member
White Belt
 
Join Date: Oct 2003
Posts: 5
Re: PushPin Selection detection in Delphi?

Quote:
Originally Posted by shadbell
When the OnSelectionChange event is fired I would like to be able to determine if the NewSelection is a PuchPin Object. Is there a way to figure this out. What I would ultimitely like to do is to display the Street Address in a status bar. I appreciate any help.
First off.. a quick note.. anything that returns a IDispatch interface usually means it can be one of many things. You can allways refer to the help at msdn.microsoft.com for a list of the things it can be.

Now for the solution (assuming the SelectionChange event)

Code:
var
  oPushpin: Pushpin;
begin
  if assigned(pNewSelection) then
  begin
    pNewSelection.QueryInterface(IID_Pushpin, oPushpin);
    if assigned(oPushpin) then
      Showmessage('It's a pushpin!')
    else
      Showmessage('It's NOT a pushpin.');
  end;
end;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 12-18-2003
Junior Member
White Belt
 
Join Date: Dec 2003
Posts: 4
Re: PushPin Selection detection in Delphi?

Thanks a lot! That is exactly what I was looking for.

Shad
__________________
Thanks,
Shad
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
delphi, detection, pushpin, selection


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Pushpin Selection EdB MapPoint 2006/2009 Discussion 2 08-14-2005 10:25 AM
mappoint installed detection Anonymous MapPoint 2006/2009 Discussion 1 10-29-2004 04:47 PM
delphi iterate pushpin dataset merlino MapPoint 2006/2009 Discussion 1 10-12-2004 10:20 AM
Vehicle simulation and location detection frenstall MapPoint 2006/2009 Discussion 2 02-11-2004 04:07 PM
Adding custom pushpins to the pushpin selection Anonymous MapPoint 2006/2009 Discussion 1 11-28-2003 04:28 PM


All times are GMT -5. The time now is 10:53 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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