Sergey,
I cut and pasted your example code into a grid's MouseWheel event and cannot get a wait window to appear. I held down the Left Shift key while clicking and/or spinning the middle mouse button. Any idea what I'm doing wrong? Does it work for you?
Mike
>Mike,
>
>I think you can use middle mouse button (scroll wheel) to do that.
>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 :(
>>
>>