Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

ElPack Shell controls issue

Hi,
I've noticed, that ElShellXXXX controls work incorrectly in modern Windows versions. It's because they use obsolete API function SHGetSpecialFolderLocation(). I've tried to change it to modern SHGetKnownFolderIDList() and have got some success. Now everything looks OK, if I set the root folder for ShellTreeView to sfoMyComputer. But ThreeView doesn't change its focused item when I double-click folders in the ListView, when I set the Tree root to sfoPersonal, sfoProfile, etc. At the same time ListView shows correct items, when I walk through the TreeView. I can provide the modified source, so is there anyone who could check it?
Thank you.

Comments

  • 3 Comments sorted by Votes Date Added
  • I can confirm the issue. But its not yet clear whether its possible to fix. However, please note, that in such cases tree root folder is explicitly reset (by our code) to sfoDesktop anyway.
  • Hi,
    >>tree root folder is explicitly reset (by our code) to sfoDesktop anywa
    And I don't consider this as a good idea. This is one of fixes, I've applied to your code. At present it doesn't reset to the sfoDesktop.
    Otherwise it is not clear what is the "root folder" property for. My idea was just to limit the scope for user.
    I can provide the modified source, but only in the case if you will fix the issue with items focusing.
    Otherwise I'll use it with "My Computer" root, as the only option.

    Thank you.
  • It seems that Windows return two different PIDLs depending of how "Documents" (sfoPersonal) folder Id is queried:
    1) Using SHGetSpecialFolderLocation or SHGetKnownFolderIDList functions.
    2) Enumerating children of parent folder, which is "This PC" (My Computer) in this case.
    And these two returning Ids are not equal. So far I see no ways to fix this and no hint in MS documentation.
Sign In or Register to comment.