Reported by Staffan Tylen.
"Hmm, when I ran a test, the 3rd parameter returned COLLAPSED after I had
clicked the item box to get it expanded."
The Microsoft doc is clear on the purpose of the EXPANDING event notification"
Notifies a tree-view control's parent window that a parent item's list of child items is about to expand or collapse. ... The action member indicates whether the list is to expand or collapse.
The current implementation code is backwards.