Urgent! Problems with skinbuttons (Antonio)

Re: Urgent! Problems with skinbuttons (Antonio)

Postby Richard Chidiak » 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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: Urgent! Problems with skinbuttons (Antonio)

Postby byte-one » 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.

Code: Select all  Expand view  RUN
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


Code: Select all  Expand view  RUN
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
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Urgent! Problems with skinbuttons (Antonio)

Postby Richard Chidiak » Thu Oct 14, 2010 1: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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: Urgent! Problems with skinbuttons (Antonio)

Postby Antonio Linares » Thu Oct 14, 2010 4:24 pm

Gunther, Richard,

Many thanks! :-)

Fix included for the next build
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42103
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Urgent! Problems with skinbuttons (Antonio)

Postby Gale FORd » Thu Oct 14, 2010 7:09 pm

Is this something I need to worry about? I cannot find skins.prg or the function FWSkinBtnLButtonUp()
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 96 guests