FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour GET-PICTURE-Problem
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
GET-PICTURE-Problem
Posted: Wed Oct 19, 2016 11:53 AM

If i insert a text from clipboard the text is not converted to uppercase, if the get has picture clausula "@!". Other pictures i have not tested.

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: GET-PICTURE-Problem
Posted: Wed Oct 19, 2016 12:00 PM

Example?

Regards.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: GET-PICTURE-Problem
Posted: Wed Oct 19, 2016 06:38 PM
Günther,

In Class TGet (source/classes/get.prg) try this:

Code (fw): Select all Collapse
      case nMsg == WM_PASTE
           if GetFocus() == ::hWnd
              CallWindowProc( ::nOldProc, ::hWnd, WM_PASTE, 0, 0 )
#ifdef UTFREVN
              if ::lWideChar
                 ::oGet:buffer   := ::GetText()
                 ::oGet:pos := ::nPos := nHiWord( ::SendMsg( EM_GETSEL ) ) + 1
                 ::SetText( ::oGet:buffer )
              else
                 if ValType( ::oGet:Original ) $ "CM"
                    SetWindowText( ::hWnd, SubStr( GetWindowText( ::hWnd ), 1, Len( ::oGet:Original ) ) )
                 endif
                 ::oGet:Buffer = GetWindowText( ::hWnd )
                 ::oGet:Pos   =  nLoWord( ::SendMsg( EM_GETSEL ) ) + 1
              endif

#else
              if ValType( ::oGet:Original ) $ "CM"
                 SetWindowText( ::hWnd, SubStr( GetWindowText( ::hWnd ), 1, Len( ::oGet:Original ) ) )
              endif

              ::oGet:Buffer = GetWindowText( ::hWnd )
              ::oGet:Pos = GetCaretPos()[ 2 ]
#endif
              ::oGet:UpdateBuffer()  // New !!!
              ::Assign()
              if ::bChange != nil
                 Eval( ::bChange,,, Self )
              endif
           endif
           return 0
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion