Q: How to disable an item?
A: Tree items do not have enabled/disabled states. That means that you can stop searching for a function called 'SetItemEnabled()', because it does not exist. You have to simulate this by your own. Let's outline what you need to do in order to 'disable' an item:
Note: Most of the material in this article is taken from codeguru.com