Windows message mechanism (1)

Source: Internet
Author: User
What are messages?
Do you think the information in a message record is the same as that in Greek? If so, let's take a look at the following explanation:
Hwnd 32-bit window handle. Windows can be any type of screen objects, because Win32 can maintain the handles of most visual objects (Windows, dialog boxes, buttons, edit boxes, etc ).
Message is used to distinguish the constant values of other messages. These constants can be pre-defined constants in Windows units or custom constants.
Wparam is a message-related constant value, or a handle to a window or control.
Lparam is usually a pointer to data in the memory. Because w p a r a m, l p a r a m, and p o I n t e r are both 3 and 2 bits,
Therefore, they can be converted to each other.

Wm_null = 0000;
Wm_create = 0001; create a window for the Application
Wm_destroy = 0002; a window is destroyed.
Wm_move = 0003; move a window
Wm_size = 0005; change the size of a window
Wm_activate = 0006; a window is activated or inactive;
Wm_setfocus = 0007; after obtaining the focus
Wm_killfocus = 0008; lost focus
Wm_enable = 000a; changed the Enable status
Wm_setredraw = 000b; set whether the window can be repainted
Wm_settext = 000c; the application sends this message to set the text of a window
Wm_gettext = 000d; the application sends this message to copy the text of the corresponding window to the buffer.
Wm_gettextlength = 000e; get the length of the text related to a window (excluding empty characters)
Wm_paint = 000f; requires a window to redraw itself
Wm_close = 0010; send a signal when a window or application is to close
Wm_queryendsession = 0011; when the user selects the end dialog box or the program calls the exitwindows Function
Wm_quit = 0012; used to end the program running or when the program calls the postquitmessage Function
Wm_queryopen = 0013; send this message to an icon when the user window restores its previous size position
Wm_erasebkgnd = 0014; when the window background must be erased (for example, when the window size changes)
Wm_syscolorchange = 0015; when the system color changes, send this message to all top-level windows
Wm_endsession = 0016; when the system process sends the wm_queryendsession message, the message is sent to the application to notify whether the conversation ends.
Wm_systemerror = 0017;

 

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.