Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


notify codes (WM_COMMAND)

This topic is 5335 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I looked through the MSDN library that came with my copy of VC6, but I can''t find something. When WM_COMMAND is passed through WndProc it sends a notify code: 0 for menus, 1 for accelerators, but it doesn''t say what it is for buttons. Does anybody know what it is? Thx in advance. Here comes the Thnikkaman!

Share this post

Link to post
Share on other sites
The high-order word specifies the notification code if the message is from a control. If the message is from an accelerator, this value is 1. If the message is from a menu, this value is zero.

The low-order word specifies the identifier of the menu item, control, or accelerator.

If a button with the ID of IDC_BUTTON1 were clicked, then LOWORD(wParam) == IDC_BUTTON1 and HIWORD(wParam) == BN_CLICKED. Also, (HWND)lparam would equal the window handle of the button.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!