Many thanks Blueapples - that will work fine for changing an icon image when the user selects a node (in which case the Node parm in the function definition is not required).
Since TVGN_CARET is used to return a handle to the currently selected node, I cannot use the same code to retrieve icon values for all nodes in the treeview. What I need is a similar function to which I can pass a node - but I couldn't seem to get the supplied one to work using the Node parm as hwnd=QueryGadget(Node,QUERY_HWND) always returns zero.
I will keep trying...
Since TVGN_CARET is used to return a handle to the currently selected node, I cannot use the same code to retrieve icon values for all nodes in the treeview. What I need is a similar function to which I can pass a node - but I couldn't seem to get the supplied one to work using the Node parm as hwnd=QueryGadget(Node,QUERY_HWND) always returns zero.
I will keep trying...