Results 1 to 40 of 228

Thread: [VB6] ucShellTree - Full-featured Shell Tree UserControl

Threaded View

  1. #11

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,673

    Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl

    It should... it expands the folder in response to a TVN_ITEMEXPANDING notification; I'd think the API would send that? Are you changing the item state or using TVM_EXPAND? MSDN says it raises the message for the latter, but I'm not clear if the former would.

    It also notes that if you expanded it once, a subsequent message wouldn't send the notification again... so if you tried to expand it, then list files copied after that into that folder, it wouldn't attempt to load them unless you cleared the TVIS_EXPANDEDONCE flag on the item:

    When an item is first expanded by a TVM_EXPAND message, the action generates TVN_ITEMEXPANDING and TVN_ITEMEXPANDED notification codes and the item's TVIS_EXPANDEDONCE state flag is set. As long as this state flag remains set, subsequent TVM_EXPAND messages do not generate TVN_ITEMEXPANDING or TVN_ITEMEXPANDED notifications. To reset the TVIS_EXPANDEDONCE state flag, you must send a TVM_EXPAND message with the TVE_COLLAPSE and TVE_COLLAPSERESET flags set. Attempting to explicitly set TVIS_EXPANDEDONCE will result in unpredictable behavior.
    Is it generating an ItemExpand event? Also, what's the return code? The control does reject that message under some circumstances; I had put a flag to work around a certain bug, but hadn't considered the case of manipulating it externally through API. If TVM_EXPAND is returning 1, that's the problem.
    Last edited by fafalone; Feb 1st, 2022 at 06:36 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width