Jump to content

EM SETFIRSTCHAR

From EDM2
Revision as of 01:57, 28 April 2025 by Martini (talk | contribs) (Created page with "This message specifies the offset of the character to be displayed in the first position of the entry field control. ==Syntax== <pre> param1 SHORT sOffset; Zero-based offset of the first character to be displayed.: param2 ULONG ulReserved; Reserved value, should be 0.: </pre> ==Parameters== ;sOffset (SHORT) - input: Zero-based offset of the first character to be displayed. ;ulReserved (ULONG) - input: Reserved value, should be 0. ==Returns== ;r...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This message specifies the offset of the character to be displayed in the first position of the entry field control.

Syntax

param1
SHORT sOffset;     /* Zero-based offset of the first character to be displayed. */

param2
ULONG ulReserved;  /* Reserved value, should be 0. */

Parameters

sOffset (SHORT) - input
Zero-based offset of the first character to be displayed.
ulReserved (ULONG) - input
Reserved value, should be 0.

Returns

rc (BOOL) - return
Success indicator.
TRUE: Successful completion.
FALSE: Error occurred. For example, because sOffset is not valid.

Remarks

The entry field control window procedure responds to this message by setting the text displayed in the edit control so that the first character displayed on the left of the window has the zero-based index specified by sOffset.

An EN_SCROLL notification message occurs if the entry field control scrolls. This message returns FALSE if the edit control does not have the ES_AUTOSCROLL style or it is center or right justified.

Default Processing

The default window procedure does not expect to receive this message and therefore takes no action on it, other than to set rc to the default value of FALSE.