Object reference from handle
Posted: Tue May 27, 2008 5:04 pm
I'm looking the way to get a reference to a control's object, given the hWnd (handle) of the control.
In clipper it can be done using GetProp( hWnd, 'WP' ) that gives the index into aWindows array.
An aScan can be done in aDialog:aControls looking for control's ID, but it is slow and is a little bit complex if there are Folders, Pages and other multidialog controls, and aControls is not allways available if oParent is not a Dialog/Window.
Any sugestion is welcome.
Regars,
Carlos.
In clipper it can be done using GetProp( hWnd, 'WP' ) that gives the index into aWindows array.
An aScan can be done in aDialog:aControls looking for control's ID, but it is slow and is a little bit complex if there are Folders, Pages and other multidialog controls, and aControls is not allways available if oParent is not a Dialog/Window.
Any sugestion is welcome.
Regars,
Carlos.