Problems processing keyboard messages
I executed the code for processing by entering the enter key, but the result is slightly different.
When you enter the enter key, you change the line, but all the previous inputs disappear
Why is this happening? How do I change the line while maintaining the previous inputs?
Since the str array variable is declared static, shouldn't the saved contents be maintained?
The problem is that the entire screen is updated because we are using the InvalidRgn function and we put NULL as the second argument of the function.
As the entire screen is updated, the previous value is erased, and then a new line is written as a TextOut function.
The TextOut function can only write one line, while the DrawText function can write multiple lines at once.
There are various solutions. And there are many problems with the current code.
Anyway, you can modify it as below to solve the question.