What is the difference between a console window and a normal window in Windows?

Source: Internet
Author: User

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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.