#include "FiveWin.ch"
#include "xhbcls.ch"
function Main()
local oDlg
EXTEND CLASS TDialog WITH Method HandleEvent
DEFINE DIALOG oDlg
ACTIVATE DIALOG oDlg CENTERED
WinExec( "notepad events.txt" )
FErase( "events.txt" )
return nil
static function HandleEvent( nMsg, nWParam, nLParam )
local Self := HB_QSelf()
LogFile( "events.txt", { ProcName( 3 ), nMsg, nWParam, nLParam } )
if nMsg == WM_INITDIALOG
return ::Initiate( nWParam, nLParam )
endif
return ::Super:HandleEvent( nMsg, nWParam, nLParam )
if AScan( { WM_COMMAND, WM_KEYDOWN, WM_LBUTTONDOWN }, nMsg ) != 0
LogFile( "events.txt", { ProcName( 3 ), nMsg, nWParam, nLParam } )
endif
Jeff Barnes wrote:where can I get xhbcls.ch ??
Jeff Barnes wrote:Also, is it possible to get the button assignment (ie: oBtnStart ) to show up in events.txt ?
#include "FiveWin.ch"
#include "xhbcls.ch"
function Main()
local oDlg
EXTEND CLASS TDialog WITH Method HandleEvent
DEFINE DIALOG oDlg
@ 1, 1 BUTTON "Press"
ACTIVATE DIALOG oDlg CENTERED
WinExec( "notepad events.txt" )
FErase( "events.txt" )
return nil
static function HandleEvent( nMsg, nWParam, nLParam )
local Self := HB_QSelf()
if nMsg == WM_COMMAND
LogFile( "events.txt", { If( IsWindow( nLParam ),;
oWndFromHwnd( nLParam ):cVarName,) } )
endif
if nMsg == WM_INITDIALOG
return ::Initiate( nWParam, nLParam )
endif
return ::Super:HandleEvent( nMsg, nWParam, nLParam )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 98 guests