On 24.05.2017 11:21, Hugh McMaster wrote:
- item.mask = TVIF_CHILDREN | TVIF_HANDLE | TVIF_STATE;
- item.stateMask = TVIS_EXPANDED | TVIS_EXPANDEDONCE | TVIS_EXPANDPARTIAL;
- SendMessageW(hwndTV, TVM_GETITEMW, 0, (LPARAM)&item)
Later you only test for TVIS_EXPANDED, is it necessary to request other bits?