Article ID: 168060
Article Last Modified on 8/13/1999
=SYS(2333,1) && to make sure VTABLE binding is on
*=SYS(2333,0) && as a test, unremark this and rerun code
frmOLEForm=CREATEOBJECT('form')
frmOLEForm.Show
=MessageBox('In the next dialog box, choose the "Insert Control" '+ ;
'button and then the "Microsoft TreeView Control" from the list.',0)
frmOLEForm.AddObject('OLETree1','olecontrol')
frmOLEForm.OLETree1.Visible = .T.
=SYS(2333,1) && this is optional
ACTIVATE SCREEN
xHitTest=frmOLEForm.OLETree1.HitTest(1,1)
? TYPE("xHitTest")
? IIF(ISBLANK(xHitTest), 'Empty', xHitTest)
* The following is the workaround if VTABLE binding is not disabled
? IIF(ISBLANK(xHitTest), .NULL., xHitTest)
TYPE("xHitTest") should return "O" for object, because, according to the
Help file, the HitTest method returns an object reference. In the newest
version of the OCX and with ActiveX Dual Interface support enabled,
xHitTest will return a Character type ("C") with a value of blank or
"empty."
Keywords: KB168060