MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




TMap.OnBeforeClick event returns bad data

This is a discussion on TMap.OnBeforeClick event returns bad data within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I am trying to use the TMap.OnBeforeClick event to determine when the user holds the control key and clicks on ...


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 05-15-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
TMap.OnBeforeClick event returns bad data

I am trying to use the TMap.OnBeforeClick event to determine when the user holds the control key and clicks on the map. MapPoint documentation makes this look trivial; however, the Button, Shift, X, and Y values all return incorrect information. The value of Shift should be 2 when the control key is held during the click. On inspection Shift returns a different value every time I click on the map while holding the control key. The same thing happens with the value of Button.

Does anyone have any suggestions as to what the problem might be? I am using Delphi rather than VB. Does the event return the correct values when used with VB?
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 05-19-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
I figured it out...

After looking at the type library I discovered that the TMap.OnBeforeClick event is passing the correct data just not in the order I expected. The problem involves calling conventions. By default VB uses a right to left convention while Delphi uses a left to right calling convention.

The parameters for the OnBeforeClick event are Button, Shift, X, Y, Cancel, respectively. In Delphi, I have to receive them in reverse order due to the change in calling convention, i.e. (Cancel, Y, X, Shift, Button).

All the parameters are Integers, so I never got an error when the parameter lists were compared at compile time.
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
bad, data, event, returns, tmaponbeforeclick


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
Custom location returns null when using find nearby in route briansbrown MapPoint 2006/2009 Discussion 2 11-15-2005 02:40 PM
Is MapPoint or something else best to map election returns? jhbroussard MapPoint 2006/2009 Discussion 2 08-24-2005 08:44 AM
FindAddressResults returns nothing Anonymous MapPoint 2006/2009 Discussion 5 12-07-2004 05:23 AM
GetPictureFromObject returns strange maps cd4000 MapPoint 2006/2009 Discussion 0 08-30-2004 07:12 PM
Mappoint-Refresh linked data on a form load event .... Anonymous MapPoint 2006/2009 Discussion 1 10-22-2001 02:38 PM


All times are GMT -5. The time now is 07:16 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 55