There seems to be some duplication in the CB functions, and I'd like to understand what drove the design decision. I'd guess there's some benefit to PB programmers, but other than common nomenclature within a message response, I'm not sure what it is.
In both %WM_NOTIFY and %WM_COMMAND, the wParam value contains:
control ID Lo(Word, CB.wparam)
notification msg Hi(Word, CB.lparam)
The only difference between the two messages is in lParam.
%WM_NOTIFY lParam contains pointer to NMHDR structure
%WM_COMMAND lParam contains handle of control sending the message
But in both %WM_NOTIFY and %WM_COMMAND, these commands are valid (even though both are discussed only under %WM_COMMAND).
CB.CTL control ID
CB.CTLMSG notification message
Then, in %WM_NOTIFY, PB offers the following CB values:
CB.NMHWND control handle
CB.NMID control ID
CB.NMCODE notification message
It looks like cb.ctl and cb.nmid are duplicate functions. It also looks like cb.ctlmsg and cb.nmcode are duplicate functions. And all are available in both %ws_notify and %ws_command messages.
Is there a benefit to using cb.ctl over cb.nmid? Or using cb.ctlmsg over cb.nmcode? Or any other reason why the duplicate functions needed to be maintained?
In both %WM_NOTIFY and %WM_COMMAND, the wParam value contains:
control ID Lo(Word, CB.wparam)
notification msg Hi(Word, CB.lparam)
The only difference between the two messages is in lParam.
%WM_NOTIFY lParam contains pointer to NMHDR structure
%WM_COMMAND lParam contains handle of control sending the message
But in both %WM_NOTIFY and %WM_COMMAND, these commands are valid (even though both are discussed only under %WM_COMMAND).
CB.CTL control ID
CB.CTLMSG notification message
Then, in %WM_NOTIFY, PB offers the following CB values:
CB.NMHWND control handle
CB.NMID control ID
CB.NMCODE notification message
It looks like cb.ctl and cb.nmid are duplicate functions. It also looks like cb.ctlmsg and cb.nmcode are duplicate functions. And all are available in both %ws_notify and %ws_command messages.
Is there a benefit to using cb.ctl over cb.nmid? Or using cb.ctlmsg over cb.nmcode? Or any other reason why the duplicate functions needed to be maintained?
Comment