Como podemos obter o item seleccionado para executarmos uma Action??
Obrigado por qq dicca...
Code: Select all
// Detecting the tap-and-hold event
#include "FWCE.ch"
#define SHRG_RETURNCMD 1
#define GN_CONTEXTMENU 1000
#define MF_ENABLED 0
#define TPM_VERTICAL 0x0040
function Main()
local oWnd
DEFINE WINDOW oWnd TITLE "Tap & Hold"
ACTIVATE WINDOW oWnd ;
ON CLICK CheckTapAndHold( oWnd, nRow, nCol )
return nil
function CheckTapAndHold( oWnd, nRow, nCol )
local hMenu
if SHRecognizeGesture( oWnd:hWnd, nCol, nRow, SHRG_RETURNCMD ) == GN_CONTEXTMENU
// MsgInfo( "Tap & Hold" )
hMenu = CreatePopupMenu()
AppendMenu( hMenu, MF_ENABLED, 10, "One" )
AppendMenu( hMenu, MF_ENABLED, 20, "Two" )
AppendMenu( hMenu, MF_ENABLED, 30, "Three" )
TrackPopupMenuEx( hMenu, TPM_VERTICAL, nRow, nCol, oWnd:hWnd )
endif
return nil