TVM_EXPAND message synchronize the reflection message

https://msdn.microsoft.com/en-us/library/windows/desktop/bb773568(v=vs.85).aspx

Remarks

Expanding a node that is already expanded is considered a successful operation and SendMessage returns a nonzero value. Collapsing a node returns zero if the node is already collapsed; otherwise it returns nonzero. Attempting to expand or collapse a node that has no children is considered a failure and SendMessagereturns zero.

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.

The expand operation may fail if the owner of the treeview control denies the operation in response to a TVN_ITEMEXPANDING notification.

posted @ 2016-08-09 11:30  飞在风口的猪  阅读(224)  评论(0编辑  收藏  举报