This _SetNextFocus() is usefull when we want to advance forward to the next item (like a TAB).
But I did not found any other function that could allow to advance backward to the previous item (like shift+tab).
I saw _SetNextFocus() uses the GetNextDlgTabItem C function.
Reading MSDN about it, says the 3rd parameter (logical type) is for next/back.
If you agree and believe would it be useful, we can use this same function:
Changing something like this one:
Code: Select all
*-----------------------------------------------------------------------------*
Procedure _SetNextFocus(lNext)
*-----------------------------------------------------------------------------*
Local i , NextControlHandle
DEFAULT lNext := .T.
NextControlHandle := GetNextDlgTabITem ( GetActiveWindow() , GetFocus() , lNext )
i := ascan ( _HMG_SYSDATA [3] , NextControlHandle )
If i > 0
If _HMG_SYSDATA [1] [i] == 'BUTTON'
SetFocus( NextControlHandle )
SendMessage ( NextControlHandle , BM_SETSTYLE , LOWORD ( BS_DEFPUSHBUTTON ) , 1 )
Else
If lNext
InsertTab()
Else
InsertShiftTab()
Endif
EndIf
Else
If lNext
InsertTab()
Else
InsertShiftTab()
Endif
EndIf
Return
What do you think Claudio ? Is it posible ?