LVM_GETISEARCHSTRING message

Retrieves the incremental search string of a list-view control. You can send this message explicitly or by using the ListView_GetISearchString macro.

Parameters

wParam

Must be zero.

lParam

Pointer to a buffer that receives the incremental search string. To just retrieve the length of the string, set lParam to NULL.

Return value

Returns the number of characters in the incremental search string, not including the terminating NULL character, or zero if the list-view control is not in incremental search mode.

Remarks

Security Warning: Using this message incorrectly might compromise the security of your program. This message does not provide a way for you to know the size of the buffer. If you use this message, first call the message passing NULL in the lParam, this returns the number of characters, excluding NULL that are required. Then call the message a second time to retrieve the string. You should review the Security Considerations: Microsoft Windows Controls before continuing.

The incremental search string is the character sequence that the user types while the list view has the input focus. Each time the user types a character, the system appends the character to the search string and then searches for a matching item. If the system finds a match, it selects the item and, if necessary, scrolls it into view.

A time-out period is associated with each character that the user types. If the time-out period elapses before the user types another character, the incremental search string is reset.

Make sure that the buffer is large enough to hold the string and the terminating NULL character. If it is too small, an immediate invalid page fault will result.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Commctrl.h
Unicode and ANSI names
LVM_GETISEARCHSTRINGW (Unicode) and LVM_GETISEARCHSTRINGA (ANSI)