#define WM_PASTE 770
...
METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS TGet
do case
case nMsg == WM_CUT
CallWindowProc( ::nOldProc, ::hWnd, WM_CUT, 0, 0 )
::oGet:buffer = Pad( GetWindowText( ::hWnd ), Len( ::oGet:buffer ) )
::oGet:Pos = 1
::oGet:Assign()
return 0
case nMsg == WM_PASTE
CallWindowProc( ::nOldProc, ::hWnd, WM_PASTE, 0, 0 )
::oGet:buffer = Pad( GetWindowText( ::hWnd ), Len( ::oGet:buffer ) )
::oGet:Assign()
return 0
endcase
return Super:HandleEvent( nMsg, nWParam, nLParam )
METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS TGet
local oClp
do case
case nMsg == WM_CUT
CallWindowProc( ::nOldProc, ::hWnd, WM_CUT, 0, 0 )
::oGet:buffer = Pad( GetWindowText( ::hWnd ), Len( ::oGet:buffer ) )
::oGet:Pos = 1
::oGet:Assign()
return 0
case nMsg == WM_PASTE
CallWindowProc( ::nOldProc, ::hWnd, WM_PASTE, 0, 0 )
::oGet:buffer = Pad( GetWindowText( ::hWnd ), Len( ::oGet:buffer ) )
DEFINE CLIPBOARD oClp OF Self FORMAT TEXT
::oGet:Pos += Len( oClp:GetText() )
oClp:End()
::oGet:Assign()
return 0
endcase
return Super:HandleEvent( nMsg, nWParam, nLParam )
METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS TGet
local oClp
do case
case nMsg == WM_CUT
CallWindowProc( ::nOldProc, ::hWnd, WM_CUT, 0, 0 )
::oGet:buffer = Pad( GetWindowText( ::hWnd ), Len( ::oGet:buffer ) )
DEFINE CLIPBOARD oClp OF Self FORMAT TEXT
::oGet:Pos -= Len( oClp:GetText() )
oClp:End()
::oGet:Assign()
return 0
case nMsg == WM_PASTE
CallWindowProc( ::nOldProc, ::hWnd, WM_PASTE, 0, 0 )
::oGet:buffer = Pad( GetWindowText( ::hWnd ), Len( ::oGet:buffer ) )
DEFINE CLIPBOARD oClp OF Self FORMAT TEXT
::oGet:Pos += Len( oClp:GetText() )
oClp:End()
::oGet:Assign()
return 0
endcase
return Super:HandleEvent( nMsg, nWParam, nLParam )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 65 guests