Windows message daily training-wm_command

Source: Internet
Author: User

When a user clicks a menu, button, drop-down list box, or other controls, wm_command is triggered.

Loword (wparam) is the control, menu, or acceleration key ID. The sparator ID of the menu is 0.

If loword (wparam) is the Control ID and hiword (wparam) is the notification code, such as bn_clicked and bn_dblclk, it indicates the user's operations on the control, double-click, and click.

If loword (wparam) is the menu ID, hiword (wparam) is 0.

If loword (wparam) is the accelerator ID, hiword (wparam) is 1.

If loword (wparam) is the Control ID and lparam is the control handle value, otherwise it is null. Actually, getdlgitem (hwnd, loword (wparam) = lparam.

Notification code naming rules:

List box: LBN _*****

Combo box: CBN _****

Tab box: TBN _****

Button: BN _*****

Edit: en _*****

 

 

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.