Skip to content

Instantly share code, notes, and snippets.

@tablacus
Last active September 23, 2020 14:08
Show Gist options
  • Select an option

  • Save tablacus/ee9c315024d08d1b1d5bcbc24fdd8ab9 to your computer and use it in GitHub Desktop.

Select an option

Save tablacus/ee9c315024d08d1b1d5bcbc24fdd8ab9 to your computer and use it in GitHub Desktop.
Reset tree view
var FV = GetFolderView(Ctrl, pt);
if (FV) {
var TV = FV.TreeView;
if (TV) {
var hwnd = TV.hwndTree;
for (var hItem = api.SendMessage(hwnd, TVM_GETNEXTITEM, 0, null); hItem; hItem = api.SendMessage(hwnd, TVM_GETNEXTITEM, 1, hItem)) {
api.SendMessage(hwnd, TVM_EXPAND, 0x8001, hItem);
}
TV.Expand(FV.FolderItem, 0);
}
}
@tablacus
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment