Where are you setting LVS_EDITLABELS, it should be placed like this ex:
this is not tested but you have to put it there, and i am pretty sure you cant do it this way Sendmessage( treeview, LVS_EDITLABELS, True, null ) because i think you have to do it when the treeview is created not after.
CreateWindowEx(WS_EX_CLIENTEDGE, "SysTreeView32", Null, WS_VISIBLE|WS_CHILD| WS_CLIPSIBLINGS| LVS_EDITLABELS, x, y, w, h, group, Null ,hInstance, Null)
this is not tested but you have to put it there, and i am pretty sure you cant do it this way Sendmessage( treeview, LVS_EDITLABELS, True, null ) because i think you have to do it when the treeview is created not after.