Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mscomctl.ocx and XP themes
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00862044
Message ID:
00862290
Views:
26
Thanks - I will work it tonight!

>Found this on the wikis
>
>
>* TreeView's Init:
>this.Nodes.Add( .null., 0, "A1", "Drop text here" )
>
>* In the TreeView's OLEDragOver event:
>*** ActiveX Control Event ***
>LPARAMETERS oData, effect, button, shift, x, y, state
>LOCAL loNode
>IF oData.GetFormat(1) && 1=text
> loNode = THIS.HitTest( x*15, y*15 )
> THIS.DropHighlight = loNode
>ENDIF
>
>* In the OLEDragDrop event of the TreeView:
>*** ActiveX Control Event ***
>LPARAMETERS oData, effect, button, shift, x, y
>LOCAL lcData, loNode
>IF oData.GetFormat(1) && text-format
>
> THIS.DropHighlight = .NULL.
> lcData = oData.GetData(1) && text-format
> loNode = THIS.HitTest( x*15,y*15 )
> MessageBox( 'Node at ('+TRANSFORM(x)+','+transform(y)+') Got data: ' + lcData )
> if VarType(loNode)='O'
> this.nodes.Add( loNode, 4, "A" + SYS(3), lcData )
> loNode.expanded = .t.
> else
> this.nodes.Add( .null., 0, "A" + SYS(3), lcData )
> endif
>
>ENDIF
>
>
>
>
>
>>One treeview property I could never get to work is DropHighLight. I could turn it on, but have not yet figured a way to turn it off. Have you had any success in turning that guy off?
>>
>>
>>>Yes, I'm using VFP8 under XP and I have no problem with native VFP controls - they are XP styled.
>>> Thanks, I know how to work with OBJECT reference.
>>>
>>> Maybe I exaggerated quantity of bugs in MSCOMCTL.ocx. What I know is that TreeView.FullRowSelect doesn't work for all Style property values. Hovewer w/o FullRowSelect selected item may looks corrupted after resizing focued TreeView.
>>> This is not a big problem, but most problematic control is Toolbar from this lib. I was using it, because it was better than VFP6 toolbars and I know that some features of this control never work as expected. For example, toolbar width is calculated incorrctly in vertical alignment. RestoreToolBar() restores something ugly, not that was saved with SaveToolBar() and other.
>>> It is good that since VFP 7, native VFP toolbars are much better than this ActiveX.
>>>
>>> As I know, MS replaced COM technology with .NET and there will be no ActiveX controls any more. Currently I don't know what is ActiveX replacement in .NET. I hope Europa will support new external controls as well as other .NET features.
>>>
>>> So, let's wait for Europa's release.
>>>
>>> Thanks.
>>>/Anton
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform