FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Urgent! Problems with skinbuttons (Antonio)
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: Urgent! Problems with skinbuttons (Antonio)
Posted: Thu Oct 14, 2010 12:23 PM

Antonio, Gunther

Can you send me the new skins.prg to check if ok ?

Please rename in another extension

Thanks

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: Urgent! Problems with skinbuttons (Antonio)
Posted: Thu Oct 14, 2010 12:38 PM
Richard, replace this functions with the following code and test it!
It seems, the error was only when you clicks very near the border.
static function IsOver( hWnd, nRow, nCol )

   local aWndRect := GetWndRect( hWnd )
   local aCursorPos := GetCursorPos()

   DEFAULT nRow := aCursorPos[ 1 ], nCol := aCursorPos[ 2 ]

return nRow > aWndRect[ 1 ]-2 .and. nRow < aWndRect[ 3 ]+2 .and. ;
       nCol > aWndRect[ 2 ]-2 .and. nCol < aWndRect[ 4 ]+2 .and. hWnd == hWndDown
function FWSkinBtnLButtonUp( hWnd, nRow, nCol )

   local hDC := GetDC( hWnd )
   local oBtn := oWndFromhWnd( hWnd )

   if IsOver( hWnd ) .and. lBtnPressed  //changed
      PostMessage( GetParent( hWnd ), WM_COMMAND, GetWindowLong( hWnd, GWL_ID ), hWnd )
   else
      ReleaseCapture()
   endif
...
...
Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: Urgent! Problems with skinbuttons (Antonio)
Posted: Thu Oct 14, 2010 01:24 PM

Gunther

if IsOver( hWnd ) .and. lBtnPressed //changed

This was the problem

Thanks for the solution

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Urgent! Problems with skinbuttons (Antonio)
Posted: Thu Oct 14, 2010 04:24 PM

Gunther, Richard,

Many thanks! :-)

Fix included for the next build

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
Re: Urgent! Problems with skinbuttons (Antonio)
Posted: Thu Oct 14, 2010 07:09 PM

Is this something I need to worry about? I cannot find skins.prg or the function FWSkinBtnLButtonUp()

Continue the discussion