Windows Programming 2

Source: Internet
Author: User

In Windows, the word "window" has a definite meaning. A window is a rectangular area on the screen. It receives user input and Displays output content in text or graphic format.

The message window contains a title column with a close button, an option icon, one or more lines of text, and a maximum of four buttons.

Creating a window is simple. You only need to call the CreateWindow function.

Function Example 3-1

  • The LoadIcon loading icon is used by the program.
     
  • LoadCursor loads the mouse cursor for the program to use.
     
  • GetStockObject gets a graphic object (in this example, it is a painting object that gets the drawing window background ).
     
  • RegisterClass is the type of the registration window in the program window.
     
  • The message box is displayed in MessageBox.
     
  • CreateWindow creates a window based on the window type.
     
  • The ShowWindow is displayed on the screen.
     
  • UpdateWindow indicates that the window is self-updated.
     
  • GetMessage obtains a message from the message queue.
     
  • TranslateMessage translates some keyboard messages.
     
  • DispatchMessage sends the message to the window message processing program.
     
  • PlaySound plays a sound file.
     
  • BeginPaint starts to draw the window.
     
  • GetClientRect obtains the size of the area displayed in the window.
     
  • The DrawText string.
     
  • EndPaint ends the painting window.
     
  • PostQuitMessage inserts an Exit message in the message queue.
     
  • DefWindowProc executes the specified message processing.

 

Related Article

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.