TreeView_SetHot macro (commctrl.h)

[Intended for internal use; not recommended for use in applications. This macro may not be supported in future versions of Windows.]

Sets the hot item for a tree-view control. You can use this macro or send the TVM_SETHOT message explicitly.

Syntax

LRESULT TreeView_SetHot(
   HWND      hwnd,
   HTREEITEM hitem
);

Parameters

hwnd

Type: HWND

Handle to the tree-view control.

hitem

Type: HTREEITEM

Handle to the new hot item. If this value is NULL, the tree-view control will be set to have no hot item.

Return value

Type: LRESULT

Returns TRUE if successful, or FALSE otherwise.

Remarks

The hot item is the item that the mouse is hovering over. The TVM_SETHOT message sent by this macro makes an item look like it is the hot item even if the mouse is not hovering over it.

The TVM_SETHOT message has no visible effect if the TVS_TRACKSELECT style is not set.

If it succeeds, the TVM_SETHOT message causes the hot item to be redrawn.

The TVM_SETHOT message is ignored if hitem is NULL and the tree-view control is tracking the mouse.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header commctrl.h

See also

TVM_SETHOT