1. Primary is Performance
You will say to me: but the opened windows are little, and therefore a small loop does not demand much time, true, but every ms saved I can use it in order to make other things (for me a good interface must answer within 0.3-0.5 s in the 99,99% of the cases)
2. Little simplification of the code
3. Reliability
You known that the VFP VM is atomic respect to any single command.
With a native VFP commands the problems with the timer are reduced respect to a multilines UDF.
But fundamentalally it is that me he seemed before what to make after to have invented BINDEVENT(hwnd).
An other thing that I would have made I am to implement a RAISEEVENT(hwnd, [Send|Post],messagecode,parameter,parameter) like a wrapper for SendMessage and PostMessage APIs.
Fabio
>Fabio,
>
>You would have much better chances to get your request considered, if you provide justification why thouse features have to be added.
>BTW, what's wrong with looping through _ SCREEN.Forms collection?
>
>>On VFP9 updated help i see 3 new functions:
>>
>>SYS(232{5|6|7})
>>
>>
>>but:
>>i have not see these expected functions:
>>
>>SYS(2328,nHwnd)
>>* Return the Form/Toolbar object with nHwnd
>>* ( if it is the WCLIENTWINDOW HWND of a AS Top form,
>>* i expected the form ( window frame ) object )
>>
>>SYS(2329,nWHANDLE) Return the Form/Toolbar object with nWHANDLE
>>
>>
>>
>>A workaround for do this is to use BIND+AEVENTS(,1) ?
>>( but perhaps I am deceived):
>>
>>* implement SYS(2328,m.nHwnd)
>>
>>PROCEDURE SYS_2328
>> =BINDEVENT(m.nHwnd,nNopeMessage,odelegate,"Getform")
>> PRIVATE hWndObject
>> =Sendmessage(m.nHwnd,m.nNopeMessage,0,0)
>> DOEVENTS
>> RETURN m.hWndObject
>>ENDPROC
>>
>>PROCEDURE odelegate.Getform
>> PRIVATE aWMsg
>> AEVENTS(aWMsg,1)
>> hWndObject = aWMsg[3]
>>and
>>* A long run for a little result!
>>
>>
>>Have I to use API API Library Construction for do this simple task ?
>>
>>At this point, why do not to add a _FORMS() public collection
>>that accept hwnd like parameters ?
>>With this i can do:
>>
>>? _FORMS(GetParent(m.someHwnd)).Caption
>>? _FORMS(GetAncestor(m.toolbarHwnd)).Caption
>>
>>
>>I hope that VFPT consider this.
>>
>>Fabio
>>
>>Of course, you do not answer to make to me to loop within _ SCREEN.Forms!