Page 1 of 1

how to get CTRL + LBUTTONDOWN Event ?

Posted: Wed Jan 11, 2023 5:08 am
by Jimmy
hi,

to "mark" multiple Item in Windows Explorer you need "Control + left Mouse Button down"

how to get that Event :?:

---

i need it for my CLASS TGrid where i get "Keyboard" Input in Method Notify

Code: Select all | Expand

   CASE nCode == LVN_KEYDOWN
      nKey := LV_GETGRIDVKEY( nPtrNMHDR )
      IF nKey = 13
         IF ::bClick != nil
            EVAL( ::bClick, ::nOption, Self )
         ENDIF
 
is this the Place to "ask" for CTRL + LBUTTONDOWN :?:

Code: Select all | Expand

      //  CTRL + Left Mouse down  
      ELSEIF ( GetKeyState( VK_CONTROL ) .AND. ??? )

Re: how to get CTRL + LBUTTONDOWN Event ?

Posted: Wed Jan 11, 2023 6:34 am
by Antonio Linares
Dear Jimmy,

Here you have a working example:

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

    local oWnd 

    DEFINE WINDOW oWnd 

    oWnd:bLClicked = { || If( GetKeyState( VK_CONTROL ), MsgInfo( "Ctrl + left click" ),) }

    ACTIVATE WINDOW oWnd 

return nil    

Re: how to get CTRL + LBUTTONDOWN Event ?

Posted: Wed Jan 11, 2023 7:02 am
by Jimmy
hi Antonio,

Code: Select all | Expand

oWnd:bLClicked = { || If( GetKeyState( VK_CONTROL ), MsgInfo( "Ctrl + left click" ),) }
YES, thx to point me to Codeblock Slot