Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between wParam WM_NOTIFY and idFrom in NMHDR?

The documentation for WM_NOTIFY says:

  • wParam:
    The identifier of the common control sending the message. This identifier is not guaranteed to be unique. An application should use the hwndFrom or idFrom member of the NMHDR structure (passed as the lParam parameter) to identify the control.

And the documentation for NMHDR says:

  • idFrom
    An identifier of the control sending the message.

What exactly is the difference between these two?

like image 680
user541686 Avatar asked Oct 07 '22 05:10

user541686


1 Answers

There is in general no difference. It's a convenience. The same convenience that you get in the WM_COMMAND message, which passes both an ID and a window handle, even though you can derive the ID from the window handle via GetDlgCtrlID.

like image 51
Raymond Chen Avatar answered Oct 12 '22 10:10

Raymond Chen