There exists in the Microsoft Knowledge base an article entitled ‘Change the TreeView Control Background Color’, found at
This uses the Custom Controls Library file, comctl32.dll and calls the SendMessage, GetWindowLong and SetWindowLong Windows API functions.
Although this works for very simple TreeViews and generally works for larger ones, there are instances when, as a Parent Node is expanded to show its Children, a white rectangle appears below the Parent Node and to the left of all the Children. This problem is quite reproducible but seems to happen haphazardly, ie at different points on different TreeViews.
Has anyone encountered this problem and fixed it or can an alternative method be recommended?
This uses the Custom Controls Library file, comctl32.dll and calls the SendMessage, GetWindowLong and SetWindowLong Windows API functions.
Although this works for very simple TreeViews and generally works for larger ones, there are instances when, as a Parent Node is expanded to show its Children, a white rectangle appears below the Parent Node and to the left of all the Children. This problem is quite reproducible but seems to happen haphazardly, ie at different points on different TreeViews.
Has anyone encountered this problem and fixed it or can an alternative method be recommended?