Zhiyi Zhang (@zhiyi) commented about dlls/comctl32/treeview.c:
} }
- if (do_track && TREEVIEW_SendSimpleNotify(infoPtr, NM_CLICK))
- if ((do_track && TREEVIEW_SendSimpleNotify(infoPtr, NM_CLICK)) || !IsWindow(hwnd))
Calling `SetFocus(hwnd)` after the window is destroyed is probably wrong. It seems better to just return without doing anything when the window is destroyed.