Sr. Antonio,
um cliente relatou o seguinte problema:
Ao usar CTRL+C de: aaaaaaaa
em seguida CTRL+V em um GET com mascara maiúscula, ex: "@!"
a classe TGET esta aceitando minuscula, ex: aaaaaaaa, em vez de AAAAAAAA
RESOLVIDO ASSIM, TGET:
METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS TGet
...
case nMsg == WM_PASTE
if GetFocus() == ::hWnd
CallWindowProc( ::nOldProc, ::hWnd, WM_PASTE, 0, 0 )
if ValType( ::oGet:Original ) $ "CM"
SetWindowText( ::hWnd, SubStr( GetWindowText( ::hWnd ), 1, Len( ::oGet:Original ) ) )
endif
MsgDelay() //EXISTE OUTRA MANEIRA DE RESOLVER?
::oGet:Buffer = GetWindowText( ::hWnd )
::oGet:Pos = GetCaretPos()[ 2 ]
::oGet:Assign()
if ::bChange != nil
Eval( ::bChange,,, Self )
endif
endif
return 0
...
/****************************************************/
function MsgDelay()
/*
*/
Local oDlg, bAction
bAction := {|| WaitSeconds( 0.02 ) }
define dialog odlg ;
from 0,0 to 0,0 ;
style nOr( DS_MODALFRAME, WS_POPUP )
oDlg:bStart := {|| Eval( bAction, oDlg ), oDlg:End(), SysRefresh() }
activate dialog odlg on init(oDlg:hide())
return nil