Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
LM_SEARCHSTRING (1.2)
◄Message Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINLISTBOXES
LM_SEARCHSTRING
mp1 = MPFROM2SHORT((USHORT) usCmd, (SHORT) iItem); /* cmd and item */
mp2 = MPFROMP((PSZ) pszSearch); /* search string */
An application sends an LM_SEARCHSTRING message to search the list for a
match to the specified string, returning the first matching item. Match
criteria can be set with flags for case-sensitivity and substring matching.
All items are searched until a match is found. Searching wraps around at the
end of the list, starting again at the first item.
Parameter Description
────────────────────────────────────────────────────────────────────────────
usCmd Low word of mp1. Specifies one of the following values that
determines how to find a match (these values can be combined by
using the OR operator):
Value Meaning
─────────────────────────────────────────────────────────────────
LSS_CASESENSITIVE Matching occurs if the item contains the
string exactly, as specified by the string in
the message.
LSS_PREFIX Matching occurs if the leading characters of
the item match the string specified in the
message. If this value is specified,
LSS_SUBSTRING should not be specified.
LSS_SUBSTRING Matching occurs if the item contains a
substring that matches the string specified in
the message. If this value is specified,
LSS_PREFIX should not be specified.
iItem High word of mp1. Indicates the index of the item to begin
searching. A value of LIT_FIRST causes searching to begin with
the first item.
pszSearch Low and high word of mp2. Points to the search string.
Return Value
The return value is the item index of the next item whose text string
matches the string specified by the pszSearch parameter, LIT_NONE if no item
is found, or LIT_ERROR if an error occurs.
♦