User Interface (User Interface Program)
User Interface: The user interface function can apply and manage a user interface. You can control the display output of the screen through these functions, prompting the software user to enter data, and call other programs to respond to user requirements with timely interaction . Most of the applications are now not only a single window job.
Application software defines some basic behavior and appearance through window classes. The window class determines some of the default window natures, such as: Click on the mouse, the response of the menu, etc. Some corresponding handler code is To respond to the window behavior of the program, call the external request job, and process the user's input, etc.
The application outputs information in the screen by using the GDI (graphics device interface) function function in the API, because all windows share a display screen, the application is not possible to use Access (control) of the entire screen. The system can only be all The column to display the output is displayed in the corresponding window. The application can make a corresponding output in the window when the message is processed. When the location of the window changes, the system will send a message to the application, thereby re-refreshing or resetting the application's window.
The application receives the event of the mouse and keyboard in the form of a message, and the operating system converts the mouse movement, click, and keypads to the keyboard to send to the corresponding message to the application's message queue. (The system provides a queue to each application to store these messages). Then, the application calls the corresponding message processing function to extract these messages from the message queue and assigne them to the corresponding Windows handler.
Applications can directly process messages of the mouse and keyboard or let the system use the menu and shortcut list to put it in the low command. You can display a column command to the user through the menu, making a corresponding behavior through the user's selection system. The shortcut key table is to correspond to the button message with the button, and the same message can be generated by it can be selected with the corresponding menu.
Applications often use the dialog box to prompt users to enter some additional accommodation, and a dialog can be counted as a temporary window that is displayed or prompted. Some common controls included are: Transformation (Buttons) And the text input box (Edit text), pull-down box (Combo Box), scroll bar ..., and more. The dialog box is sent to the application for the input of these controls, and helps the application to complete some commands.
You can also share some useful resources by adding some data "resources" files or some DLL (dynamic link library files), such as bitmaps, icons, fonts, and strings, etc., the application uses resources through the resource function. Resource is transferred and put in memory.
There are also some other Windows function functions in the user interface. Through them, you can easily set up the symbol, clipboard, cursor, hook, icon, menu, etc. Windows.
(2, not finished)