03-02-2021, 11:23 PM
I just figured out my own question by looking through the MS documentation here:
https://docs.microsoft.com/en-us/windows...-constants
After looking at the object properties, I found out that the default action is "Expand" when the State is STATE_SYSTEM_COLLAPSED. The default action flips to "Collapse" when it's expanded.
https://docs.microsoft.com/en-us/windows...-constants
if a.State&STATE_SYSTEM_COLLAPSED
out "Collapsed, expanding"
a.DoDefaultAction
else
out "Not Collapsed, doing nothing."
After looking at the object properties, I found out that the default action is "Expand" when the State is STATE_SYSTEM_COLLAPSED. The default action flips to "Collapse" when it's expanded.