Antonio, Gunther
Can you send me the new skins.prg to check if ok ?
Please rename in another extension
Thanks
Richard
Urgent! Problems with skinbuttons (Antonio)
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Urgent! Problems with skinbuttons (Antonio)
Richard, replace this functions with the following code and test it!
It seems, the error was only when you clicks very near the border.
It seems, the error was only when you clicks very near the border.
Code: Select all | Expand
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
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
...
...
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Urgent! Problems with skinbuttons (Antonio)
Gunther
if IsOver( hWnd ) .and. lBtnPressed //changed
This was the problem
Thanks for the solution
Richard
if IsOver( hWnd ) .and. lBtnPressed //changed
This was the problem
Thanks for the solution
Richard
- Antonio Linares
- Site Admin
- Posts: 42516
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 75 times
- Contact:
Re: Urgent! Problems with skinbuttons (Antonio)
Gunther, Richard,
Many thanks!![Smile :-)](./images/smilies/icon_smile.gif)
Fix included for the next build
Many thanks!
![Smile :-)](./images/smilies/icon_smile.gif)
Fix included for the next build
Re: Urgent! Problems with skinbuttons (Antonio)
Is this something I need to worry about? I cannot find skins.prg or the function FWSkinBtnLButtonUp()