10#define WIN32_LEAN_AND_MEAN
15extern "C" __declspec(dllexport) UINT __stdcall SortTree(MSIHANDLE)
19 HWND hwndMSI = FindWindowW(L
"MsiDialogCloseClass",
nullptr);
20 if (hwndMSI ==
nullptr)
22 OutputDebugStringW(L
"SortTree: MsiDialogCloseClass not found\n");
25 HWND hwndTV = FindWindowExW(hwndMSI,
nullptr, L
"SysTreeView32",
nullptr);
26 if (hwndTV ==
nullptr)
28 OutputDebugStringW(L
"SortTree: SysTreeView32 not found\n");
31 HTREEITEM optional = TreeView_GetRoot(hwndTV);
32 if (optional ==
nullptr)
34 OutputDebugStringW(L
"SortTree: Optional Components branch not found\n");
37 HTREEITEM dicts = TreeView_GetChild(hwndTV, optional);
40 OutputDebugStringW(L
"SortTree: Dictionaries branch not found\n");
43 TreeView_SortChildren(hwndTV, dicts,
TRUE);
44 HTREEITEM langs = TreeView_GetNextSibling(hwndTV, optional);
47 OutputDebugStringW(L
"SortTree: Additional UI Languages branch not found\n");
50 TreeView_SortChildren(hwndTV, langs,
TRUE);
__declspec(dllexport) UINT __stdcall SortTree(MSIHANDLE)