|
|
|
StartAutoExpandTimer |
Starts a timer for the specified item, so a SFTTREEN_AUTOEXPANDING notification will be sent.
C
BOOL WINAPI SftTree_StartAutoExpandTimer(HWND hwndCtl, int index, BOOL fDeselectedItemsOnly, UINT elapse); BOOL WINAPI SftTreeSplit_StartAutoExpandTimer(HWND hwndCtl, int index, BOOL fDeselectedItemsOnly, UINT elapse);
C++
BOOL CSftTree::StartAutoExpandTimer(int index, BOOL fDeselectedItemsOnly, UINT elapse); BOOL CSftTreeSplit::StartAutoExpandTimer(int index, BOOL fDeselectedItemsOnly, UINT elapse);
Parameters
hwndCtl
The window handle of the tree control.
index
Defines the zero-based index of the item, for which a SFTTREEN_AUTOEXPANDING notification will be sent once the timer expires.
fDeselectedItemsOnly
Set to TRUE to send a SFTTREEN_AUTOEXPANDING notification only if the item described by index is not selected. Otherwise, if fDeselectedItemsOnly is FALSE, the SFTTREEN_AUTOEXPANDING notification will be sent regardless of the selection status of the item.
elapse
Defines the time interval (in milliseconds) when the SFTTREEN_AUTOEXPANDING notification will be sent.
Returns
StartAutoExpandTimer returns TRUE if the function was successful, otherwise FALSE is returned.
Comments
The StartAutoExpandTimer function starts a timer for the specified item, so a SFTTREEN_AUTOEXPANDING notification will be sent.
This function is normally used during drag & drop processing to implement autoexpanding folders when the mouse cursor hovers over a collapsed folder. Once StartAutoExpandTimer is called, the SFTTREEN_AUTOEXPANDING notification will be sent after elapse milliseconds. If StartAutoExpandTimer is called again before the SFTTREEN_AUTOEXPANDING notification is sent, a pending timer is canceled and the timer is restarted.
StopAutoExpandTimer can be used to cancel the timer.
Once the SFTTREEN_AUTOEXPANDING notification is sent, the application can use the GetExpandCollapseIndex function to retrieve the index of the item to expand.
See Also C/C++ API | Categories | Notifications