left mouse button condition

left mouse button condition

Postby Natter » Wed Mar 16, 2016 8:06 am

How can you determine that the left mouse button is pressed (function MLeftDown always returns .F.) ?
Natter
 
Posts: 1211
Joined: Mon May 14, 2007 9:49 am

Re: left mouse button condition

Postby Antonio Linares » Wed Mar 16, 2016 8:23 am

oControl:bLClicked := { | nRow, nCol, nFlags | MsgInfo( "left mouse pressed" ) }

or oWnd or oDlg instead of oControl
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42074
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: left mouse button condition

Postby Natter » Wed Mar 16, 2016 9:05 am

bRClicked - handles the event of pressing the left mouse button. But I'm interested in the status of this button when you move the mouse cursor across several controls.
Each of these controls has its bMMoved in which the function is called. If left mouse button pressed, the function is executed
Natter
 
Posts: 1211
Joined: Mon May 14, 2007 9:49 am

Re: left mouse button condition

Postby Antonio Linares » Wed Mar 16, 2016 9:29 am

Then you have to use Windows function GetAsyncKeyState():

https://msdn.microsoft.com/en-us/library/windows/desktop/ms646293(v=vs.85).aspx
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42074
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: left mouse button condition

Postby Natter » Wed Mar 16, 2016 9:43 am

Thanks, Antonio !
Natter
 
Posts: 1211
Joined: Mon May 14, 2007 9:49 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 73 guests