how to get CTRL + LBUTTONDOWN Event ?

how to get CTRL + LBUTTONDOWN Event ?

Postby Jimmy » Wed Jan 11, 2023 5:08 am

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 view
  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 view
     //  CTRL + Left Mouse down  
      ELSEIF ( GetKeyState( VK_CONTROL ) .AND. ??? )
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: how to get CTRL + LBUTTONDOWN Event ?

Postby Antonio Linares » Wed Jan 11, 2023 6:34 am

Dear Jimmy,

Here you have a working example:
Code: Select all  Expand view
#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
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: how to get CTRL + LBUTTONDOWN Event ?

Postby Jimmy » Wed Jan 11, 2023 7:02 am

hi Antonio,

Code: Select all  Expand view
oWnd:bLClicked = { || If( GetKeyState( VK_CONTROL ), MsgInfo( "Ctrl + left click" ),) }

YES, thx to point me to Codeblock Slot
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 62 guests