Small bug in class TBTNBMP

Small bug in class TBTNBMP

Postby ADutheil » Fri Jan 13, 2012 11:57 pm

A friend of mine noticed a small problem with TBTNBMP class. If an accelerator key if defined for a button it works even the button is disabled. I patched adding

.AND. aControls[ n ]:lActive

to line (1631 in FWH 11.12)

if Upper( SubStr( cPrompt, nAt + 1, 1 ) ) == Upper( Chr( nKey ) )

in CallClick function in class TControl but I don´t know if it is the best way.
Regards,

André Dutheil
FWH 13.04 + HB 3.2 + MSVS 10
ADutheil
 
Posts: 368
Joined: Sun May 31, 2009 6:25 pm
Location: Salvador - Bahia - Brazil

Re: Small bug in class TBTNBMP

Postby Antonio Linares » Sat Jan 14, 2012 8:29 am

André,

Very good, thanks :-)

Just a minor change to your code:

if Upper( SubStr( cPrompt, nAt + 1, 1 ) ) == Upper( Chr( nKey ) ) .and. IsWindowEnabled( aControls[ n ]:hWnd )
regards, saludos

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 108 guests