Call the SSSetTypeEdit function and set the parameters as follows:
Set the ChrSet parameter to specify a character set that can be used to type data.
Set the Len parameter to specify the maximum number of characters allowed in the cell.
Set the Style parameter to ES_MULTILINE to let users type multiple lines of text in the cell.
If you set the Style parameter to ES_MULTILINE in step 1c and you want to allow the user to press the Enter key to add a new line, set the Style parameter to ES_WANTRETURN.
Set the Style parameter to ES_AUTOHSCROLL to allow horizontal scrolling in the cell.