0

Hello friendly people,

i am working on a small GUI, and my goal is that the user can create textfields and edit them in the GUI. After that i want to export the data and display the user input on an E-Paper Display via Arduino.

I got the code working but it is not possible for me to insert a new line in a textfield, which kind of limits the usability.

To create the window i am using the following code:

CreateWindowEx(WS_EX_LEFT, TEXT("Edit"), TEXT("default text"),
                WS_BORDER | WS_CHILD | WS_VISIBLE, DataText[TextCount][0], DataText[TextCount][1],
                DataText[TextCount][2]- DataText[TextCount][0], DataText[TextCount][3]-DataText[TextCount][1],
                DrawArea, NULL, NULL, NULL);

DataText[][] is an integer and is used to store the coordinates of the different textfields.

Do you know a way how I could change my code in order to be able to let the user insert a new line?

Reference pic of the GUI:

Picture of the GUI I am designing, for reference

J'zargo
  • 13
  • 3
  • Probably adding the `ES_MULTILINE|ES_WANTRETURN` styles to your window (see [here](https://stackoverflow.com/a/2701926/10871073)) will suffice. Try it out. – Adrian Mole Jun 24 '21 at 12:16
  • Or [this one](https://stackoverflow.com/q/66861512/10871073) may even be a duplicate (sort of). – Adrian Mole Jun 24 '21 at 12:18
  • @AdrianMole this works, thanks a lot! I dont know why i didn't find these styles anywhere, seems pretty basic... – J'zargo Jun 24 '21 at 13:18

0 Answers0