Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid control's MouseWheel event problem
Message
 
 
À
23/11/2003 16:51:45
Mike Sue-Ping
Cambridge, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00852801
Message ID:
00852817
Vues:
21
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform