Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid control's MouseWheel event problem
Message
From
23/11/2003 17:21:58
 
 
To
23/11/2003 16:51:45
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00852801
Message ID:
00852817
Views:
22
Mike,

I think you can use middle mouse button (scroll wheel) to do that.
* Grid's MouseWhell
LPARAMETERS nDirection, nShift, nXCoord, nYCoord
DECLARE SHORT  GetKeyState IN WIN32API INTEGER
#define VK_LBUTTON        0x01
#define VK_RBUTTON        0x02
#define VK_MBUTTON        0x04
IF GetKeyState( VK_MBUTTON ) < 0 ;
		AND GetKeyState( VK_LBUTTON ) >= 0 ;
		AND GetKeyState( VK_RBUTTON ) >= 0 
  * The middle mouse button is down
	WAIT WINDOW PROGRAM() 
ENDIF	
>Hi Sergey,
>
>I was trying to provide the user with a way to change the fontsize in the grid by using the mousewheel to enlarge or reduce the size. I wanted to use Shift + wheel so as to preserve the default behaviour of the mousewheel in a grid (ie to scroll the grid's contents).
>
>I've tried successfully to do what I need if I don't try to trap the Shift key. The grid's contents grow or shrink when I spin the mousewheel. It just doesn't want to work if I test for nShift :(
>
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform