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 thehwndFromoridFrommember of theNMHDRstructure (passed as thelParamparameter) 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?
There is in general no difference. It’s a convenience. The same convenience that you get in the
WM_COMMANDmessage, which passes both an ID and a window handle, even though you can derive the ID from the window handle viaGetDlgCtrlID.