how to get CTRL + LBUTTONDOWN Event ?

Post Reply
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

how to get CTRL + LBUTTONDOWN Event ?

Post 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. ??? )
greeting,
Jimmy
User avatar
Antonio Linares
Site Admin
Posts: 42595
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 38 times
Been thanked: 86 times
Contact:

Re: how to get CTRL + LBUTTONDOWN Event ?

Post 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    
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: how to get CTRL + LBUTTONDOWN Event ?

Post 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
greeting,
Jimmy
Post Reply