Community of MapPoint and Virtual Earth Users and Developers
This is a discussion on BeforeClick (or MouseClick) determine if a specific key is pressed? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hey everyone. I'm using Mappoint 2006 and Visual Basic 2005. What I'm trying to determine is if there is a ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| BeforeClick (or MouseClick) determine if a specific key is pressed? So, let's say if a user clicks on a Pushpin, the first thing I want to know is if the Ctrl key is currently depressed? If yes, then do something. If not, do what Mappoint normally does. Is this possible? Thank you in advance for any and all help that you can give. It is very much appreciated. |
| |||
| Re: BeforeClick (or MouseClick) determine if a specific key is pressed?
You could use this API function to examine the key state: SHORT GetKeyState(int nVirtKey) // virtual-key code; Where nVirtKey is VK_SHIFT (Shift Key), VK_CONTROL (Ctrl Key), and VK_MENU (Alt Key) If the function succeeds, the return value specifies the status of the given virtual key. If the high-order bit is 1, the key is down; otherwise, it is up. If the low-order bit is 1, the key is toggled. The key status returned from this function changes as a given thread reads key messages from its message queue. The status does not reflect the interrupt-level state associated with the hardware. Use the GetAsyncKeyState function (same syntax) to retrieve that information. |
| |||
| Re: BeforeClick (or MouseClick) determine if a specific key is pressed?
Hi, there is a shift property in the event handler's argument. You can set there a bitmask to check if shift, alt, or ctrl (or combination) is pressed.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| beforeclick, determine, key, mouseclick, pressed, specific |
| ||||
| Posted By | For | Type | Date | |
| Untitled document | This thread | Refback | 07-21-2008 07:12 PM | |
| BeforeClick (or MouseClick) determine if a specific key is pressed? - MapPoint Forums | This thread | Refback | 04-03-2008 07:13 PM | |
| Making Pushpin Locations Immoveable - MapPoint Articles - MP2K Magazine | This thread | Refback | 04-01-2008 11:47 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| BeforeClick event cancel not working with VC++ | mayfly | MapPoint 2006/2009 Discussion | 3 | 05-05-2007 11:13 AM |
| beforeclick event | mmartin | MapPoint 2006/2009 Discussion | 2 | 04-13-2007 06:36 AM |
| Determine if Map has been closed | BirdIslander | MapPoint 2006/2009 Discussion | 1 | 12-07-2005 01:33 PM |
| Determine if a polyline is closed? | Anonymous | MapPoint 2006/2009 Discussion | 4 | 03-29-2005 11:37 AM |
| Is there a way to determine the minimum distance b.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 01-22-2002 04:45 AM |
Algarve Holiday
Portuguese all year round sunshine is some of what awaits you if you choose the Algarve holiday option through UlookUbook!