>Miguel,
>
>You can change the Background colour of a standard Treeview using the following API routines.
>
>
>LOCAL lnColorRef
>
>declare integer SendMessage in win32api integer, integer, integer, integer
>
>#define TV_FIRST 0x1100
>#define TVM_SETBKCOLOR (TV_FIRST + 29)
>
>lnColorRef = SendMessage(HWndTreeviewControl, TVM_SETBKCOLOR, 0, 0)
>
>
>Now this code depends on two things, the treeview in the ActiveX is based on the Common controls treeview class and the ability to get a valid HWND for the Treeview control.
>
>I have not looked into either dependancies but I am sure their are people on UT (Ed, George, Erik to name but a few :-)) who can help you on this.
Neil (and Miguel too),
After looking at the code in the KB article, I saw an reference to a property that's undocumented in the treeview (and I'd guess that it's also available in the listview). I did a little testing, and determined that it does indeed exist. The property is the window handle of the treeview, named hWnd.
The only question that remains (and hopefully Miguel can answer this one for us) is will this work? VFP doesn't handle windows messagaging the same way that other applications do, so there's a chance that it may not let this happen. At any rate, if Miguel will report back to us, we'll know the answer.
George
Ubi caritas et amor, deus ibi est