Jump to content

CM SEARCHSTRING

From EDM2
Revision as of 01:22, 21 April 2025 by Martini (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This message returns the pointer to a container record whose text matches the string.

Syntax

param1
PSEARCHSTRING pSearchString; /* Pointer to the SEARCHSTRING structure. */

param2
PRECORDCORE pSearchAfter;  /* Pointer to the starting container record. */
Note
; If the CCS_MINIRECORDCORE style bit is specified when a container is created, then MINIRECORDCORE should be used instead of RECORDCORE, and PMINIRECORDCORE should be used instead of PRECORDCORE in all applicable data structures and messages.

Parameters

pSearchString (PSEARCHSTRING) - Input
Pointer to the SEARCHSTRING structure.
pSearchAfter (PRECORDCORE) - Input
Pointer to the starting container record.
CMA_FIRST: Start the search at the first container record.
Other: Start the search after the container record specified by this pointer. To get all of the records in the container whose text matches the string, this message is sent repeatedly. Each time this message is sent, the pSearchAfter parameter contains a pointer to the last record that was found.

Returns

pRecord (PRECORDCORE) - returns
Pointer to the found container record.
NULL: No container record's text matches the search string.
-1: An error occurred. The WinGetLastError function may return the following error:
PMERR_INVALID_PARAMETERS.
Other: Pointer to the container record whose text matches the search string.

Remarks

The CM_SEARCHSTRING message is NLS-enabled.

In the details view, the string is searched for in each column of each record.

Default Processing

The default window procedure does not expect to receive this message and therefore takes no action on it other than to return NULL.