CSSetHoverCursor Function

Description

When tracking mode is ON (see CSSetTrackZones and LW_TRACK_ZONES attribute in CSCreateLogWindow), Consoul changes the mouse cursor to a pointing hand (IDC_HAND Win32 API constant) by default.

The cursor used when hovering over a zone can be changed with this CSSetHoverCursor Consoul API function.

Syntax

VB/A 32bits

Private Declare Function CSSetHoverCursor Lib "consoul_010205_32.dll" ( _
  ByVal hWnd As Long, _
  ByVal hCursor As Long _
) As Integer

VB/A 64bits

Private Declare PtrSafe Function CSSetHoverCursor Lib "consoul_010205_64.dll" ( _
  ByVal hWnd As LongPtr, _
  ByVal hCursor As LongPtr _
) As Integer

Return Value

The return value is 1 (one), or 0 (zero) if the passed Consoul window handle (hWnd) is not a valid one.

Parameters

hWnd

The window handle (HWND) of the Consoul window, as returned by CSCreateLogWindow.

hCursor

A valid Win32 API cursor handle (HCURSOR), or 0 (zero) to restore the default hover cursor (pointing hand).

Remarks

The host is responsible for creating the cursor and passing its handle to the Consoul library via this function. The host should take care of disposing of it only after having reset it to its default value by passing (HCURSOR)0 (zero) to this function.

Last updated: May 13 2022.