I am trying to debug some Tree View code, and I want to check that the HTREEITEM
returned by CTreeCtrl.InsertItem
is valid in memory.
However I cannot find any documentation for HTREEITEM
in any of the places I usually check (Google, MSDN, Coworkers), only a whole bunch of people asking the same question.
Do you know what HTREEITEM
is defined as? Do you know any good links that detail the internal structure of a HTREEITEM
?
I am working in C++, but C references would also be helpful.
It's just an opaque handle to a tree item in the default Tree View controls on Windows. You can acquire handles using e.g.
TVM_INSERTITEM
, they are used in other functions then for referencing the items.The handle is defined in
CommCtrl.h
(part of the Windows SDK) like this:This is also the essence of an opaque handle: you only know that it references some data (a
struct
, in this case) but you don't know the definition of the data.