Accept either TVI_ROOT or NULL for the parent to imply sort the entire
tree.
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index 8b164be..3bf77aa 100644
--- a/dlls/comctl32/treeview.c
+++ b/dlls/comctl32/treeview.c
@@ -2933,8 +2933,8 @@
PFNDPACOMPARE pfnCompare;
LPARAM lpCompare;
- /* undocumented feature: TVI_ROOT means `sort the whole tree' */
- if (parent == TVI_ROOT)
+ /* undocumented feature: TVI_ROOT or NULL means `sort the whole tree' */
+ if (parent == TVI_ROOT || parent == NULL)
parent = infoPtr->root;
/* Check for a valid handle to the parent item */