|
-
Mar 7th, 2001, 10:48 AM
#1
Thread Starter
Lively Member
windows 95b
vb v5.0
tree view activex control v6.0
i'm having a problem with this treeview color function..
http://xiner.virtualave.net/gamescope/images/ss8.jpg
it colors everything except the back color of where the text is..
here is the code:
With lstgames
Call SendMessage(.hwnd, TVM_SETBKCOLOR, 0, ByVal &HF1CBA8)
Call SendMessage(.hwnd, TVM_SETTEXTCOLOR, 0, ByVal &H800000)
lngStyle = GetWindowLong(.hwnd, GWL_STYLE)
If lngStyle And TVS_HASLINES Then
Call SetWindowLong(.hwnd, GWL_STYLE, lngStyle Xor TVS_HASLINES)
Call SetWindowLong(.hwnd, GWL_STYLE, lngStyle)
End If
End With
-
Mar 7th, 2001, 10:58 AM
#2
Fanatic Member
Try adding this directly after the With statement...
Code:
'general declarations
Private Declare Function SetBkMode Lib "gdi32" (ByVal hdc As Long, ByVal nBkMode As Long) As Long
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Const TRANSPARENT = 1
'
' directly after with statement
SetBkMode GetDC(.hwnd), TRANSPARENT
If that doesn't work see if there is a TVM_SETFILLCOLOR flag (to change the fillcolor) and set it to the same value of the BackColor of the Treeview.
{Insert random techno-babble here}
{Insert quote from some long gone mofo here}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|