FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour 3 problems with touch.prg from the fwh/samples
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: 3 problems with touch.prg from the fwh/samples
Posted: Thu Nov 08, 2018 07:32 AM
Dear Antonio,
is this the right place where I should test.
If yes then it is not working. I tested remote and locally.

Do you thinkthere will be a solution?
Thank you in advance
Otto


Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: 3 problems with touch.prg from the fwh/samples
Posted: Thu Nov 08, 2018 07:57 AM

Dear Antonio
I use TRBtn as I never got TImage working.
In my copy of TRBtn I inserted DrawEllipse method and changed Paint method.
This is working for me. But now I want to switch to the newest FIVEWIN version and original FW classes evolved much.
It is difficult for me to keep up my changes.

Best regards
Otto

method paint
...

if ::lMOver .and. nTypeButton != 3

    do case
       case nTypeButton == TYPE_NORMAL

          if ::lSelected
              GradientFill( ::hDC, 1, 1, ::nHeight, ::nWidth - If(::lRound,2,0), eval( ::bClrGradSelectPress, ::lPressed ) )   
          else
                //procl          
                if ::lRound = .t.
                    GradientFill( ::hDC, 1, 1, ::nHeight, ::nWidth - If(::lRound,2,0), eval( ::bClrGradNormal, ::lPressed ) )  
            else

                ::DrawEllipse( ::hDC, CLR_BLUE, 1 )    
                endif 
         endif

       case nTypeButton == TYPE_POPUP
          GradientFill( ::hDC, 1,1, ::nHeight, ::nWidth - 2, ::aClrGradBack )

...

//----------------------------------------------------------------------------//

METHOD DrawEllipse( hDC, nRGBColor, n ) CLASS TRBtn

local hOldBrush := SelectObject( hDC, GetStockObject( NULL_BRUSH ) )
local hPen := CreatePen( hDC, 1, nRGBColor )

DEFAULT n := -1

Ellipse( hDC, n, n, ::nWidth - 1 , ::nHeight - 1 , hPen )

SelectObject( ::hDC, hOldBrush )
DeleteObject( hPen )

return nil

//----------------------------------------------------------------------------//

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: 3 problems with touch.prg from the fwh/samples
Posted: Fri Nov 09, 2018 04:01 PM
Dear Otto,

Please go to "Company", then click on "+" and then test it

thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: 3 problems with touch.prg from the fwh/samples
Posted: Fri Nov 09, 2018 11:27 PM

Dear Antonio,
you sample works but you have no hover bitmap.
Also you have to move the mouse more than 2 cm away till MsgInfo is executed.

If we add
oImgBack:bMMoved = { || If( oImgBack:cBmpFile != "..\bitmaps\metro\Metro-Back-48hover.bmp",;
( oImgBack:LoadImage( nil, "..\bitmaps\metro\Metro-Back-48hover.bmp" ), oImgBack:Refresh() ), nil ) }

then oImgBack:bMLeave = { || MsgInfo( 1 ) in no more working.

Thank you in advance
Otto

Continue the discussion