1. window is Windows Standard window with window handle, but console window has no message loop, reads data directly from buffer, displays data.
Windows has its own window process, I can use SetWindowLong to modify the window process, but the console window modified to not receive the message, is the window why the console cannot be modified by the window process to capture the message?
1. The console is implemented based on stdio-related handles, and the internal loop process is constantly using readconsole to read input buffers and display the results with writeconsole output, equivalent to the peak and translate messages in the window. It is not based on Message Queuing and of course does not accept messages. Remember when you started to learn C when the console used printf and scanf? Using the header file they need to add is stdio.h
2. console window I understand that the system is maintained, and only the Stdio interface is provided.
I don't know if you found it. The console window size is an integer multiple of the character size, that is, there is no case where only half of the characters are displayed. This is actually related to how the console works.
There is a buffer in the stdio, each write to the end of the buffer, beyond the buffer, will be written later "top" out. The size of the buffer will change as the window size is changed.
What is the difference between a console window and a normal window in Windows?